car_base.tscn 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. [gd_scene load_steps=19 format=3 uid="uid://c1uai3rvx8hul"]
  2. [ext_resource type="Script" path="res://vehicles/vehicle.gd" id="1_r806m"]
  3. [ext_resource type="Texture2D" uid="uid://d4ostmqwgytk" path="res://vehicles/particle_smoke.png" id="2_1gkvk"]
  4. [ext_resource type="ArrayMesh" uid="uid://bqrwin8ccgptt" path="res://vehicles/meshes/wheel.res" id="2_3cqaw"]
  5. [ext_resource type="ArrayMesh" uid="uid://b2xi556mwp7ue" path="res://vehicles/meshes/minivan.res" id="3_cqia8"]
  6. [ext_resource type="Script" path="res://vehicles/follow_camera.gd" id="4_6igu8"]
  7. [ext_resource type="AudioStream" uid="uid://cb7wvsd6vygd3" path="res://vehicles/engine.wav" id="5_m8g7o"]
  8. [ext_resource type="AudioStream" uid="uid://sy2li7u35867" path="res://vehicles/impact_1.wav" id="6_kq567"]
  9. [ext_resource type="AudioStream" uid="uid://bf0h7s81yr8nj" path="res://vehicles/impact_2.wav" id="7_e8n8v"]
  10. [ext_resource type="AudioStream" uid="uid://sun2n8a4xapl" path="res://vehicles/impact_3.wav" id="8_mh5uv"]
  11. [ext_resource type="AudioStream" uid="uid://dpbayeeufya21" path="res://vehicles/impact_4.wav" id="9_bomp1"]
  12. [ext_resource type="Texture2D" uid="uid://bju75l2w3r7vq" path="res://vehicles/blob_shadow.png" id="11_3ryw5"]
  13. [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_l7i2k"]
  14. friction = 0.5
  15. [sub_resource type="BoxShape3D" id="BoxShape3D_x74tc"]
  16. size = Vector3(0.954078, 1, 2.32662)
  17. [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_bpr2q"]
  18. random_pitch = 1.05
  19. random_volume_offset_db = 2.0
  20. streams_count = 4
  21. stream_0/stream = ExtResource("6_kq567")
  22. stream_0/weight = 1.0
  23. stream_1/stream = ExtResource("7_e8n8v")
  24. stream_1/weight = 1.0
  25. stream_2/stream = ExtResource("8_mh5uv")
  26. stream_2/weight = 1.0
  27. stream_3/stream = ExtResource("9_bomp1")
  28. stream_3/weight = 1.0
  29. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fuuj3"]
  30. transparency = 1
  31. shading_mode = 0
  32. vertex_color_use_as_albedo = true
  33. albedo_color = Color(0.462745, 0.462745, 0.462745, 0.501961)
  34. albedo_texture = ExtResource("2_1gkvk")
  35. billboard_mode = 3
  36. billboard_keep_scale = true
  37. particles_anim_h_frames = 1
  38. particles_anim_v_frames = 1
  39. particles_anim_loop = false
  40. proximity_fade_enabled = true
  41. proximity_fade_distance = 0.5
  42. [sub_resource type="QuadMesh" id="QuadMesh_30wks"]
  43. material = SubResource("StandardMaterial3D_fuuj3")
  44. [sub_resource type="Curve" id="Curve_4j5vd"]
  45. _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
  46. point_count = 2
  47. [sub_resource type="Gradient" id="Gradient_p5xtl"]
  48. colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
  49. [node name="CarBase" type="Node3D"]
  50. [node name="Body" type="VehicleBody3D" parent="."]
  51. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00169557, 0.222867, -0.0955184)
  52. center_of_mass_mode = 1
  53. physics_material_override = SubResource("PhysicsMaterial_l7i2k")
  54. script = ExtResource("1_r806m")
  55. [node name="Wheel1" type="VehicleWheel3D" parent="Body"]
  56. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.115169, 1.10416)
  57. use_as_traction = true
  58. use_as_steering = true
  59. wheel_roll_influence = 0.4
  60. wheel_radius = 0.25
  61. wheel_friction_slip = 1.0
  62. suspension_travel = 2.0
  63. suspension_stiffness = 40.0
  64. damping_compression = 0.88
  65. [node name="Wheel1" type="MeshInstance3D" parent="Body/Wheel1"]
  66. layers = 2
  67. gi_mode = 2
  68. mesh = ExtResource("2_3cqaw")
  69. [node name="Wheel2" type="VehicleWheel3D" parent="Body"]
  70. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.115169, -0.783403)
  71. use_as_traction = true
  72. wheel_roll_influence = 0.4
  73. wheel_radius = 0.25
  74. wheel_friction_slip = 1.0
  75. suspension_travel = 2.0
  76. suspension_stiffness = 40.0
  77. damping_compression = 0.88
  78. [node name="Wheel2" type="MeshInstance3D" parent="Body/Wheel2"]
  79. layers = 2
  80. gi_mode = 2
  81. mesh = ExtResource("2_3cqaw")
  82. [node name="Wheel3" type="VehicleWheel3D" parent="Body"]
  83. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.573678, 0.115169, 1.10416)
  84. use_as_traction = true
  85. use_as_steering = true
  86. wheel_roll_influence = 0.4
  87. wheel_radius = 0.25
  88. wheel_friction_slip = 1.0
  89. suspension_travel = 2.0
  90. suspension_stiffness = 40.0
  91. damping_compression = 0.88
  92. [node name="Wheel3" type="MeshInstance3D" parent="Body/Wheel3"]
  93. layers = 2
  94. gi_mode = 2
  95. mesh = ExtResource("2_3cqaw")
  96. [node name="Wheel4" type="VehicleWheel3D" parent="Body"]
  97. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.573678, 0.115169, -0.783403)
  98. use_as_traction = true
  99. wheel_roll_influence = 0.4
  100. wheel_radius = 0.25
  101. wheel_friction_slip = 1.0
  102. suspension_travel = 2.0
  103. suspension_stiffness = 40.0
  104. damping_compression = 0.88
  105. [node name="Wheel4" type="MeshInstance3D" parent="Body/Wheel4"]
  106. layers = 2
  107. gi_mode = 2
  108. mesh = ExtResource("2_3cqaw")
  109. [node name="Body" type="MeshInstance3D" parent="Body"]
  110. layers = 2
  111. gi_mode = 2
  112. mesh = ExtResource("3_cqia8")
  113. [node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
  114. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.588269, 0.0774262)
  115. shape = SubResource("BoxShape3D_x74tc")
  116. [node name="CameraBase" type="Node3D" parent="Body"]
  117. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.97449, 0)
  118. [node name="Camera3D" type="Camera3D" parent="Body/CameraBase"]
  119. transform = Transform3D(-1, 2.11495e-08, -8.48259e-08, 0, 0.970296, 0.241922, 8.74228e-08, 0.241922, -0.970296, 0, 2.032, -4.394)
  120. fov = 74.0
  121. near = 0.1
  122. script = ExtResource("4_6igu8")
  123. min_distance = 4.0
  124. max_distance = 5.0
  125. height = 1.25
  126. [node name="EngineSound" type="AudioStreamPlayer3D" parent="Body"]
  127. stream = ExtResource("5_m8g7o")
  128. pitch_scale = 0.05
  129. autoplay = true
  130. attenuation_filter_cutoff_hz = 20500.0
  131. [node name="ImpactSound" type="AudioStreamPlayer3D" parent="Body"]
  132. stream = SubResource("AudioStreamRandomizer_bpr2q")
  133. volume_db = -9.0
  134. max_polyphony = 3
  135. attenuation_filter_cutoff_hz = 20500.0
  136. [node name="CPUParticles3D" type="CPUParticles3D" parent="Body"]
  137. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.201696, -0.022867, -1.10448)
  138. amount = 125
  139. lifetime = 1.25
  140. mesh = SubResource("QuadMesh_30wks")
  141. direction = Vector3(0, 1, -0.5)
  142. gravity = Vector3(0, 0, 0)
  143. initial_velocity_min = 1.0
  144. initial_velocity_max = 1.0
  145. damping_min = 0.05
  146. damping_max = 0.05
  147. angle_max = 360.0
  148. scale_amount_curve = SubResource("Curve_4j5vd")
  149. color_ramp = SubResource("Gradient_p5xtl")
  150. [node name="BlobShadow" type="Decal" parent="Body"]
  151. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.05)
  152. size = Vector3(1.6, 4, 3)
  153. texture_albedo = ExtResource("11_3ryw5")
  154. upper_fade = 2.0
  155. lower_fade = 1.0
  156. cull_mask = 1048573
  157. [node name="AudioListener3D" type="AudioListener3D" parent="Body"]
  158. current = true
  159. [node name="InteriorCameraPosition" type="Marker3D" parent="Body"]
  160. transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.9, 0.3)
  161. [node name="TopDownCameraPosition" type="Marker3D" parent="Body"]
  162. transform = Transform3D(-1, 8.74228e-08, 0, 3.82137e-15, 4.37114e-08, 1, 8.74228e-08, 1, -4.37114e-08, 0.00169557, 15.7771, 0.0955178)