87 lines
3.0 KiB
Plaintext
87 lines
3.0 KiB
Plaintext
[gd_scene load_steps=8 format=2]
|
|
|
|
[ext_resource path="res://scripts/player/player.gd" type="Script" id=1]
|
|
[ext_resource path="res://scripts/player/race_car.gd" type="Script" id=2]
|
|
[ext_resource path="res://assets/raceCar/body.obj" type="ArrayMesh" id=3]
|
|
[ext_resource path="res://assets/raceCar/wheel.obj" type="ArrayMesh" id=4]
|
|
|
|
[sub_resource type="Curve3D" id=1]
|
|
bake_interval = 0.05
|
|
_data = {
|
|
"points": PoolVector3Array( ),
|
|
"tilts": PoolRealArray( )
|
|
}
|
|
|
|
[sub_resource type="SpatialMaterial" id=2]
|
|
albedo_color = Color( 0.14902, 0.14902, 0.14902, 1 )
|
|
|
|
[sub_resource type="BoxShape" id=3]
|
|
extents = Vector3( 0.075079, 0.03, 0.13 )
|
|
|
|
[node name="Player" type="Spatial"]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="Path" type="Path" parent="."]
|
|
curve = SubResource( 1 )
|
|
|
|
[node name="PathFollow" type="PathFollow" parent="Path"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 0.999999, 0, 0, 0 )
|
|
v_offset = 0.015
|
|
rotation_mode = 4
|
|
loop = false
|
|
|
|
[node name="raceCar" type="KinematicBody" parent="Path/PathFollow"]
|
|
collision_layer = 31
|
|
collision_mask = 31
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="body" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.125 )
|
|
mesh = ExtResource( 3 )
|
|
material/0 = null
|
|
material/1 = null
|
|
material/2 = null
|
|
|
|
[node name="wheelBackLeft" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.061, 0.024, -0.082 )
|
|
mesh = ExtResource( 4 )
|
|
material/0 = SubResource( 2 )
|
|
material/1 = null
|
|
|
|
[node name="wheelBackRight" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.061, 0.024, -0.082 )
|
|
mesh = ExtResource( 4 )
|
|
material/0 = SubResource( 2 )
|
|
material/1 = null
|
|
|
|
[node name="wheelFrontLeft" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.061, 0.024, 0.078 )
|
|
mesh = ExtResource( 4 )
|
|
material/0 = SubResource( 2 )
|
|
material/1 = null
|
|
|
|
[node name="wheelFrontRight" type="MeshInstance" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.061, 0.024, 0.078 )
|
|
mesh = ExtResource( 4 )
|
|
material/0 = SubResource( 2 )
|
|
material/1 = null
|
|
|
|
[node name="collision" type="CollisionShape" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.03, 0.01 )
|
|
shape = SubResource( 3 )
|
|
|
|
[node name="CameraTarget" type="Spatial" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.3, -0.6 )
|
|
|
|
[node name="ray" type="RayCast" parent="Path/PathFollow/raceCar"]
|
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.075, 0.2 )
|
|
enabled = true
|
|
cast_to = Vector3( 0, -0.2, 0 )
|
|
collision_mask = 0
|
|
|
|
[node name="ResetTimer" type="Timer" parent="."]
|
|
wait_time = 3.0
|
|
one_shot = true
|
|
[connection signal="road_entered" from="Path/PathFollow/raceCar" to="." method="_on_raceCar_road_entered"]
|
|
[connection signal="timeout" from="ResetTimer" to="." method="_on_ResetTimer_timeout"]
|