Public repository for MUR pre alpha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.0 KiB

  1. [gd_scene load_steps=8 format=2]
  2. [ext_resource path="res://scripts/player/player.gd" type="Script" id=1]
  3. [ext_resource path="res://scripts/player/race_car.gd" type="Script" id=2]
  4. [ext_resource path="res://assets/raceCar/body.obj" type="ArrayMesh" id=3]
  5. [ext_resource path="res://assets/raceCar/wheel.obj" type="ArrayMesh" id=4]
  6. [sub_resource type="Curve3D" id=1]
  7. bake_interval = 0.05
  8. _data = {
  9. "points": PoolVector3Array( ),
  10. "tilts": PoolRealArray( )
  11. }
  12. [sub_resource type="SpatialMaterial" id=2]
  13. albedo_color = Color( 0.14902, 0.14902, 0.14902, 1 )
  14. [sub_resource type="BoxShape" id=3]
  15. extents = Vector3( 0.075079, 0.03, 0.13 )
  16. [node name="Player" type="Spatial"]
  17. script = ExtResource( 1 )
  18. [node name="Path" type="Path" parent="."]
  19. curve = SubResource( 1 )
  20. [node name="PathFollow" type="PathFollow" parent="Path"]
  21. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 0.999999, 0, 0, 0 )
  22. v_offset = 0.015
  23. rotation_mode = 4
  24. loop = false
  25. [node name="raceCar" type="KinematicBody" parent="Path/PathFollow"]
  26. collision_layer = 31
  27. collision_mask = 31
  28. script = ExtResource( 2 )
  29. [node name="body" type="MeshInstance" parent="Path/PathFollow/raceCar"]
  30. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.125 )
  31. mesh = ExtResource( 3 )
  32. material/0 = null
  33. material/1 = null
  34. material/2 = null
  35. [node name="wheelBackLeft" type="MeshInstance" parent="Path/PathFollow/raceCar"]
  36. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.061, 0.024, -0.082 )
  37. mesh = ExtResource( 4 )
  38. material/0 = SubResource( 2 )
  39. material/1 = null
  40. [node name="wheelBackRight" type="MeshInstance" parent="Path/PathFollow/raceCar"]
  41. transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.061, 0.024, -0.082 )
  42. mesh = ExtResource( 4 )
  43. material/0 = SubResource( 2 )
  44. material/1 = null
  45. [node name="wheelFrontLeft" type="MeshInstance" parent="Path/PathFollow/raceCar"]
  46. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.061, 0.024, 0.078 )
  47. mesh = ExtResource( 4 )
  48. material/0 = SubResource( 2 )
  49. material/1 = null
  50. [node name="wheelFrontRight" type="MeshInstance" parent="Path/PathFollow/raceCar"]
  51. transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.061, 0.024, 0.078 )
  52. mesh = ExtResource( 4 )
  53. material/0 = SubResource( 2 )
  54. material/1 = null
  55. [node name="collision" type="CollisionShape" parent="Path/PathFollow/raceCar"]
  56. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.03, 0.01 )
  57. shape = SubResource( 3 )
  58. [node name="CameraTarget" type="Spatial" parent="Path/PathFollow/raceCar"]
  59. transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.3, -0.6 )
  60. [node name="ray" type="RayCast" parent="Path/PathFollow/raceCar"]
  61. transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.075, 0.2 )
  62. enabled = true
  63. cast_to = Vector3( 0, -0.2, 0 )
  64. collision_mask = 0
  65. [node name="ResetTimer" type="Timer" parent="."]
  66. wait_time = 3.0
  67. one_shot = true
  68. [connection signal="road_entered" from="Path/PathFollow/raceCar" to="." method="_on_raceCar_road_entered"]
  69. [connection signal="timeout" from="ResetTimer" to="." method="_on_ResetTimer_timeout"]