small racing game im working on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[gd_scene load_steps=15 format=3 uid="uid://bnbab2hgqh4w5"]

[ext_resource type="Script" path="res://main.gd" id="1_cps4g"]
[ext_resource type="Environment" uid="uid://biwshm46yl62v" path="res://default_env.tres" id="1_rbfsw"]
[ext_resource type="CameraAttributesPractical" uid="uid://nhsovwj5hjip" path="res://cam.tres" id="2_rymfk"]
[ext_resource type="Material" path="res://assets/mats/grass.tres" id="3_iiti7"]
[ext_resource type="Script" path="res://cam.gd" id="4_u07o8"]
[ext_resource type="PackedScene" uid="uid://dyd5mqhgu6qfv" path="res://assets/cars/kenney_sedan/sedan.tscn" id="6_1vlt4"]
[ext_resource type="PackedScene" uid="uid://clw61td2wh84w" path="res://scenes/track.tscn" id="6_u5ece"]
[ext_resource type="Theme" uid="uid://ch2uo5qd8ubx6" path="res://ui/theme.tres" id="8_qjj2f"]
[ext_resource type="Script" path="res://ui/map.gd" id="9_17iea"]
[ext_resource type="Script" path="res://ui/speedometer.gd" id="10_fu5aw"]
[ext_resource type="Curve3D" uid="uid://u2f56xx8h2re" path="res://tracks/speedway_curve.tres" id="12_5lojs"]
[ext_resource type="Resource" uid="uid://d3te55uy5ei7k" path="res://tracks/speedway_track.tres" id="13_pjowj"]

[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_tkhh8"]

[sub_resource type="PlaneMesh" id="PlaneMesh_ta0cd"]
material = ExtResource("3_iiti7")
size = Vector2(5000, 5000)

[node name="main" type="Node3D"]
script = ExtResource("1_cps4g")

[node name="Sun" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.261981, -0.791013, -0.55287, 0.791617, -0.15154, 0.591927, -0.552004, -0.592735, 0.586479, 0, 37.0187, 0)
directional_shadow_mode = 0

[node name="Env" type="WorldEnvironment" parent="."]
environment = ExtResource("1_rbfsw")
camera_attributes = ExtResource("2_rymfk")

[node name="Ground" type="StaticBody3D" parent="."]
metadata/_edit_lock_ = true
metadata/_edit_group_ = true

[node name="CollisionShape" type="CollisionShape3D" parent="Ground"]
shape = SubResource("WorldBoundaryShape3D_tkhh8")

[node name="MeshInstance" type="MeshInstance3D" parent="Ground"]
mesh = SubResource("PlaneMesh_ta0cd")

[node name="Camera3D" type="Camera3D" parent="." node_paths=PackedStringArray("follow_this")]
transform = Transform3D(-0.718418, -0.318909, -0.618201, 0.111279, -0.92996, 0.350416, -0.686653, 0.182953, 0.703588, -7.07504, 13.1712, 16.3801)
far = 400.0
script = ExtResource("4_u07o8")
follow_this = NodePath("../Car/Sedan")
target_distance = 9.0
target_height = 5.0

[node name="Car" type="Node3D" parent="."]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 2, 100)

[node name="Sedan" parent="Car" instance=ExtResource("6_1vlt4")]
show_debug = true

[node name="CanvasLayer" type="CanvasLayer" parent="."]

[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer"]
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -152.0
offset_top = -105.0
offset_right = 152.0
grow_horizontal = 2
grow_vertical = 0
theme = ExtResource("8_qjj2f")
theme_override_constants/separation = 50

[node name="Panel" type="PanelContainer" parent="CanvasLayer/HBoxContainer"]
layout_mode = 2
theme = ExtResource("8_qjj2f")

[node name="Speedometer" type="Label" parent="CanvasLayer/HBoxContainer/Panel" node_paths=PackedStringArray("car")]
custom_minimum_size = Vector2(0, 105)
layout_mode = 2
size_flags_horizontal = 4
text = "龍 0km/h"
horizontal_alignment = 1
vertical_alignment = 1
script = ExtResource("10_fu5aw")
car = NodePath("../../../../Car/Sedan")

[node name="MiniMap" type="Line2D" parent="CanvasLayer" node_paths=PackedStringArray("track")]
position = Vector2(200, 150)
default_color = Color(0.588235, 0.588235, 0.588235, 0.807843)
joint_mode = 2
antialiased = true
script = ExtResource("9_17iea")
track = NodePath("../../Track")

[node name="Track" parent="." instance=ExtResource("6_u5ece")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
curve = ExtResource("12_5lojs")
track = ExtResource("13_pjowj")

[node name="Road" parent="Track" index="0"]
polygon = PackedVector2Array(-20, 0, -20, -0.1, 20, -0.1, 20, 0)

[node name="CollisionShape" parent="Track" index="1"]
polygon = PackedVector2Array(-23, 0, 23, 0, 23, 5, 26, 5, 26, -1, -26, -1, -26, 5, -23, 5)

[node name="Rail-L" parent="Track" index="2"]
polygon = PackedVector2Array(23, 0.5, 22.95, 0.47, 22.95, 0.43, 23, 0.4, 23, 0.55, 22.95, 0.32, 22.95, 0.28, 23, 0.25, 23.05, 0.25, 23.05, 0.5)

[node name="Rail-R" parent="Track" index="3"]
polygon = PackedVector2Array(-23, 0.5, -22.95, 0.47, -22.95, 0.43, -23, 0.4, -23, 0.55, -22.95, 0.32, -22.95, 0.28, -23, 0.25, -23.05, 0.25, -23.05, 0.5)

[node name="Support" parent="Track" index="4"]
polygon = PackedVector2Array(-22, -0.17, 22, -0.17, 25.1, -2, -25, -2)

[editable path="Track"]