tow_truck.tscn 14 KB

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