tow_truck.tscn 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. [gd_scene load_steps=28 format=3 uid="uid://bh7765vrq5muf"]
  2. [ext_resource type="Script" path="res://vehicles/vehicle.gd" id="1_qhfnb"]
  3. [ext_resource type="ArrayMesh" uid="uid://bqrwin8ccgptt" path="res://vehicles/meshes/wheel.res" id="2_uwuq1"]
  4. [ext_resource type="ArrayMesh" uid="uid://cbpqxxd14g8un" path="res://vehicles/meshes/tow_truck.res" id="3_tv0o3"]
  5. [ext_resource type="Script" path="res://vehicles/follow_camera.gd" id="4_wddne"]
  6. [ext_resource type="ArrayMesh" uid="uid://ctglc27jx8xe2" path="res://vehicles/meshes/truck_cab.res" id="5_04cnp"]
  7. [ext_resource type="AudioStream" uid="uid://cb7wvsd6vygd3" path="res://vehicles/engine.wav" id="5_fwfew"]
  8. [ext_resource type="AudioStream" uid="uid://sy2li7u35867" path="res://vehicles/impact_1.wav" id="6_i7k5m"]
  9. [ext_resource type="AudioStream" uid="uid://bf0h7s81yr8nj" path="res://vehicles/impact_2.wav" id="7_hc8k7"]
  10. [ext_resource type="AudioStream" uid="uid://sun2n8a4xapl" path="res://vehicles/impact_3.wav" id="8_cbgcu"]
  11. [ext_resource type="AudioStream" uid="uid://dpbayeeufya21" path="res://vehicles/impact_4.wav" id="9_y8ei3"]
  12. [ext_resource type="Texture2D" uid="uid://d4ostmqwgytk" path="res://vehicles/particle_smoke.png" id="10_lfosv"]
  13. [ext_resource type="Texture2D" uid="uid://bju75l2w3r7vq" path="res://vehicles/blob_shadow.png" id="11_5ul8v"]
  14. [sub_resource type="BoxShape3D" id="BoxShape3D_0hbge"]
  15. size = Vector3(1.17624, 0.6963, 2.23996)
  16. [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_aad58"]
  17. random_pitch = 1.05
  18. random_volume_offset_db = 2.0
  19. streams_count = 4
  20. stream_0/stream = ExtResource("6_i7k5m")
  21. stream_0/weight = 1.0
  22. stream_1/stream = ExtResource("7_hc8k7")
  23. stream_1/weight = 1.0
  24. stream_2/stream = ExtResource("8_cbgcu")
  25. stream_2/weight = 1.0
  26. stream_3/stream = ExtResource("9_y8ei3")
  27. stream_3/weight = 1.0
  28. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_atib4"]
  29. transparency = 1
  30. shading_mode = 0
  31. vertex_color_use_as_albedo = true
  32. albedo_color = Color(0.462745, 0.462745, 0.462745, 0.501961)
  33. albedo_texture = ExtResource("10_lfosv")
  34. billboard_mode = 3
  35. billboard_keep_scale = true
  36. particles_anim_h_frames = 1
  37. particles_anim_v_frames = 1
  38. particles_anim_loop = false
  39. proximity_fade_enabled = true
  40. proximity_fade_distance = 0.5
  41. [sub_resource type="QuadMesh" id="QuadMesh_xsbig"]
  42. material = SubResource("StandardMaterial3D_atib4")
  43. [sub_resource type="Curve" id="Curve_kr6si"]
  44. _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
  45. point_count = 2
  46. [sub_resource type="Gradient" id="Gradient_38b5g"]
  47. colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
  48. [sub_resource type="CapsuleMesh" id="CapsuleMesh_i2aww"]
  49. radius = 0.05
  50. height = 0.42
  51. radial_segments = 12
  52. rings = 3
  53. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nrety"]
  54. albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
  55. metallic = 1.0
  56. roughness = 0.5
  57. [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eoojf"]
  58. radius = 0.05
  59. height = 0.3
  60. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_so248"]
  61. albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
  62. metallic = 1.0
  63. roughness = 0.5
  64. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c2qj1"]
  65. albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
  66. metallic = 1.0
  67. roughness = 0.5
  68. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ffy5m"]
  69. albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
  70. metallic = 1.0
  71. roughness = 0.5
  72. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_l1evv"]
  73. albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
  74. metallic = 1.0
  75. roughness = 0.5
  76. [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_hvgqm"]
  77. friction = 0.5
  78. [sub_resource type="BoxShape3D" id="BoxShape3D_hbuqf"]
  79. size = Vector3(0.954078, 1, 2.32662)
  80. [node name="TowTruck" type="Node3D"]
  81. [node name="Body" type="VehicleBody3D" parent="."]
  82. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00169557, 0.222867, -0.0955184)
  83. center_of_mass_mode = 1
  84. script = ExtResource("1_qhfnb")
  85. [node name="Wheel1" type="VehicleWheel3D" parent="Body"]
  86. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.000773743, 1.10416)
  87. use_as_traction = true
  88. use_as_steering = true
  89. wheel_roll_influence = 0.4
  90. wheel_radius = 0.18
  91. wheel_friction_slip = 1.0
  92. suspension_stiffness = 30.0
  93. damping_compression = 0.88
  94. [node name="Wheel1" type="MeshInstance3D" parent="Body/Wheel1"]
  95. layers = 2
  96. gi_mode = 2
  97. mesh = ExtResource("2_uwuq1")
  98. [node name="Wheel2" type="VehicleWheel3D" parent="Body"]
  99. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.000773743, -0.783403)
  100. use_as_traction = true
  101. wheel_roll_influence = 0.4
  102. wheel_radius = 0.18
  103. wheel_friction_slip = 1.0
  104. suspension_stiffness = 30.0
  105. damping_compression = 0.88
  106. [node name="Wheel2" type="MeshInstance3D" parent="Body/Wheel2"]
  107. layers = 2
  108. gi_mode = 2
  109. mesh = ExtResource("2_uwuq1")
  110. [node name="Wheel3" type="VehicleWheel3D" parent="Body"]
  111. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.573678, 0.000773743, 1.10416)
  112. use_as_traction = true
  113. use_as_steering = true
  114. wheel_roll_influence = 0.4
  115. wheel_radius = 0.18
  116. wheel_friction_slip = 1.0
  117. suspension_stiffness = 30.0
  118. damping_compression = 0.88
  119. [node name="Wheel3" type="MeshInstance3D" parent="Body/Wheel3"]
  120. layers = 2
  121. gi_mode = 2
  122. mesh = ExtResource("2_uwuq1")
  123. [node name="Wheel4" type="VehicleWheel3D" parent="Body"]
  124. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.573678, 0.000773743, -0.783403)
  125. use_as_traction = true
  126. wheel_roll_influence = 0.4
  127. wheel_radius = 0.18
  128. wheel_friction_slip = 1.0
  129. suspension_stiffness = 30.0
  130. damping_compression = 0.88
  131. [node name="Wheel4" type="MeshInstance3D" parent="Body/Wheel4"]
  132. layers = 2
  133. gi_mode = 2
  134. mesh = ExtResource("2_uwuq1")
  135. [node name="Body" type="MeshInstance3D" parent="Body"]
  136. layers = 2
  137. gi_mode = 2
  138. mesh = ExtResource("3_tv0o3")
  139. [node name="CameraBase" type="Node3D" parent="Body"]
  140. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.97449, 0)
  141. [node name="Camera3D" type="Camera3D" parent="Body/CameraBase"]
  142. transform = Transform3D(-1, 2.11495e-08, -8.48259e-08, 0, 0.970296, 0.241922, 8.74227e-08, 0.241922, -0.970295, 0, 2.032, -4.394)
  143. current = true
  144. fov = 74.0
  145. near = 0.1
  146. script = ExtResource("4_wddne")
  147. min_distance = 5.0
  148. max_distance = 7.0
  149. height = 1.75
  150. [node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
  151. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.391365, 0.158069)
  152. shape = SubResource("BoxShape3D_0hbge")
  153. [node name="EngineSound" type="AudioStreamPlayer3D" parent="Body"]
  154. stream = ExtResource("5_fwfew")
  155. pitch_scale = 0.05
  156. autoplay = true
  157. attenuation_filter_cutoff_hz = 20500.0
  158. [node name="ImpactSound" type="AudioStreamPlayer3D" parent="Body"]
  159. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.391365, 0.158069)
  160. stream = SubResource("AudioStreamRandomizer_aad58")
  161. volume_db = -9.0
  162. max_polyphony = 3
  163. attenuation_filter_cutoff_hz = 20500.0
  164. [node name="CPUParticles3D" type="CPUParticles3D" parent="Body"]
  165. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.201696, -0.022867, -1.10448)
  166. amount = 125
  167. lifetime = 1.25
  168. mesh = SubResource("QuadMesh_xsbig")
  169. direction = Vector3(0, 1, -0.5)
  170. gravity = Vector3(0, 0, 0)
  171. initial_velocity_min = 1.0
  172. initial_velocity_max = 1.0
  173. damping_min = 0.05
  174. damping_max = 0.05
  175. angle_max = 360.0
  176. scale_amount_curve = SubResource("Curve_kr6si")
  177. color_ramp = SubResource("Gradient_38b5g")
  178. [node name="BlobShadow" type="Decal" parent="Body"]
  179. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00169557, -0.222867, 0.145518)
  180. size = Vector3(1.6, 4, 3)
  181. texture_albedo = ExtResource("11_5ul8v")
  182. upper_fade = 2.0
  183. lower_fade = 1.0
  184. cull_mask = 1048573
  185. [node name="AudioListener3D" type="AudioListener3D" parent="Body"]
  186. current = true
  187. [node name="InteriorCameraPosition" type="Marker3D" parent="Body"]
  188. transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.9, 0.3)
  189. [node name="TopDownCameraPosition" type="Marker3D" parent="Body"]
  190. 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)
  191. [node name="ChainB1" type="RigidBody3D" parent="."]
  192. transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0, 1.10846, -1.55698)
  193. [node name="Chain1" type="MeshInstance3D" parent="ChainB1"]
  194. layers = 2
  195. gi_mode = 2
  196. mesh = SubResource("CapsuleMesh_i2aww")
  197. surface_material_override/0 = SubResource("StandardMaterial3D_nrety")
  198. [node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB1"]
  199. shape = SubResource("CapsuleShape3D_eoojf")
  200. [node name="ChainB2" type="RigidBody3D" parent="."]
  201. transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0, 0.803378, -1.75806)
  202. [node name="Chain1" type="MeshInstance3D" parent="ChainB2"]
  203. layers = 2
  204. gi_mode = 2
  205. mesh = SubResource("CapsuleMesh_i2aww")
  206. surface_material_override/0 = SubResource("StandardMaterial3D_so248")
  207. [node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB2"]
  208. shape = SubResource("CapsuleShape3D_eoojf")
  209. [node name="ChainB3" type="RigidBody3D" parent="."]
  210. transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0, 0.490045, -1.96106)
  211. [node name="Chain1" type="MeshInstance3D" parent="ChainB3"]
  212. layers = 2
  213. gi_mode = 2
  214. mesh = SubResource("CapsuleMesh_i2aww")
  215. surface_material_override/0 = SubResource("StandardMaterial3D_c2qj1")
  216. [node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB3"]
  217. shape = SubResource("CapsuleShape3D_eoojf")
  218. [node name="ChainB4" type="RigidBody3D" parent="."]
  219. transform = Transform3D(1, 0, 0, 0, 0.447167, -0.894451, 0, 0.894451, 0.447167, 0, 0.290326, -2.19413)
  220. [node name="Chain1" type="MeshInstance3D" parent="ChainB4"]
  221. layers = 2
  222. gi_mode = 2
  223. mesh = SubResource("CapsuleMesh_i2aww")
  224. surface_material_override/0 = SubResource("StandardMaterial3D_ffy5m")
  225. [node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB4"]
  226. shape = SubResource("CapsuleShape3D_eoojf")
  227. [node name="ChainB5" type="RigidBody3D" parent="."]
  228. transform = Transform3D(1, 0, 0, 0, 0.0993884, -0.995049, 0, 0.995049, 0.0993884, 0, 0.205717, -2.50193)
  229. [node name="Chain1" type="MeshInstance3D" parent="ChainB5"]
  230. layers = 2
  231. gi_mode = 2
  232. mesh = SubResource("CapsuleMesh_i2aww")
  233. surface_material_override/0 = SubResource("StandardMaterial3D_l1evv")
  234. [node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB5"]
  235. shape = SubResource("CapsuleShape3D_eoojf")
  236. [node name="PinJoint1" type="PinJoint3D" parent="."]
  237. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.28044, -1.4153)
  238. node_a = NodePath("../Body")
  239. node_b = NodePath("../ChainB1")
  240. [node name="PinJoint2" type="PinJoint3D" parent="."]
  241. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.962693, -1.6492)
  242. node_a = NodePath("../ChainB1")
  243. node_b = NodePath("../ChainB2")
  244. [node name="PinJoint3" type="PinJoint3D" parent="."]
  245. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.644947, -1.85661)
  246. node_a = NodePath("../ChainB2")
  247. node_b = NodePath("../ChainB3")
  248. params/bias = 0.5
  249. [node name="PinJoint4" type="PinJoint3D" parent="."]
  250. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.350687, -2.04279)
  251. node_a = NodePath("../ChainB3")
  252. node_b = NodePath("../ChainB4")
  253. params/bias = 0.5
  254. [node name="PinJoint5" type="PinJoint3D" parent="."]
  255. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.217609, -2.33375)
  256. node_a = NodePath("../ChainB4")
  257. node_b = NodePath("../ChainB5")
  258. params/bias = 0.5
  259. [node name="Body2" type="VehicleBody3D" parent="."]
  260. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00169557, 0.222867, -3.97518)
  261. mass = 10.0
  262. center_of_mass_mode = 1
  263. physics_material_override = SubResource("PhysicsMaterial_hvgqm")
  264. [node name="Wheel1" type="VehicleWheel3D" parent="Body2"]
  265. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.115169, 1.10416)
  266. use_as_traction = true
  267. use_as_steering = true
  268. wheel_roll_influence = 0.4
  269. wheel_radius = 0.25
  270. wheel_friction_slip = 1.0
  271. suspension_travel = 2.0
  272. suspension_stiffness = 40.0
  273. damping_compression = 0.88
  274. [node name="Wheel1" type="MeshInstance3D" parent="Body2/Wheel1"]
  275. layers = 2
  276. gi_mode = 2
  277. mesh = ExtResource("2_uwuq1")
  278. [node name="Wheel2" type="VehicleWheel3D" parent="Body2"]
  279. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.115169, -0.783403)
  280. use_as_traction = true
  281. wheel_roll_influence = 0.4
  282. wheel_radius = 0.25
  283. wheel_friction_slip = 1.0
  284. suspension_travel = 2.0
  285. suspension_stiffness = 40.0
  286. damping_compression = 0.88
  287. [node name="Wheel2" type="MeshInstance3D" parent="Body2/Wheel2"]
  288. layers = 2
  289. gi_mode = 2
  290. mesh = ExtResource("2_uwuq1")
  291. [node name="Wheel3" type="VehicleWheel3D" parent="Body2"]
  292. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.573678, 0.115169, 1.10416)
  293. use_as_traction = true
  294. use_as_steering = true
  295. wheel_roll_influence = 0.4
  296. wheel_radius = 0.25
  297. wheel_friction_slip = 1.0
  298. suspension_travel = 2.0
  299. suspension_stiffness = 40.0
  300. damping_compression = 0.88
  301. [node name="Wheel3" type="MeshInstance3D" parent="Body2/Wheel3"]
  302. layers = 2
  303. gi_mode = 2
  304. mesh = ExtResource("2_uwuq1")
  305. [node name="Wheel4" type="VehicleWheel3D" parent="Body2"]
  306. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.573678, 0.115169, -0.783403)
  307. use_as_traction = true
  308. wheel_roll_influence = 0.4
  309. wheel_radius = 0.25
  310. wheel_friction_slip = 1.0
  311. suspension_travel = 2.0
  312. suspension_stiffness = 40.0
  313. damping_compression = 0.88
  314. [node name="Wheel4" type="MeshInstance3D" parent="Body2/Wheel4"]
  315. layers = 2
  316. gi_mode = 2
  317. mesh = ExtResource("2_uwuq1")
  318. [node name="Body" type="MeshInstance3D" parent="Body2"]
  319. layers = 2
  320. gi_mode = 2
  321. mesh = ExtResource("5_04cnp")
  322. [node name="CollisionShape3D" type="CollisionShape3D" parent="Body2"]
  323. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.588269, 0.0774262)
  324. shape = SubResource("BoxShape3D_hbuqf")
  325. [node name="BlobShadow" type="Decal" parent="Body2"]
  326. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00169557, -0.122867, 0.0251799)
  327. size = Vector3(1.6, 4, 3)
  328. texture_albedo = ExtResource("11_5ul8v")
  329. upper_fade = 2.0
  330. lower_fade = 1.0
  331. cull_mask = 1048573
  332. [node name="PinJoint6" type="PinJoint3D" parent="."]
  333. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.148269, -2.64894)
  334. node_a = NodePath("../ChainB5")
  335. node_b = NodePath("../Body2")