Add camera selection to Truck Town (#820)

This commit is contained in:
Hugo Locurcio
2023-01-17 21:39:18 +01:00
committed by GitHub
parent 8a6a3a8eef
commit 55934859e3
7 changed files with 226 additions and 148 deletions

View File

@@ -3,9 +3,19 @@
This is a demo implementing different types of trucks of
varying complexity using vehicle physics.
Controls:
- <kbd>Up Arrow</kbd>, <kbd>W</kbd>, <kbd>Gamepad Right Trigger</kbd>, <kbd>Gamepad A/Cross</kbd>: Accelerate
- <kbd>Down Arrow</kbd>, <kbd>S</kbd>, <kbd>Gamepad Left Trigger</kbd>, <kbd>Gamepad B/Circle</kbd> : Brake
- <kbd>Left Arrow</kbd>, <kbd>Gamepad Left Stick</kbd>: Steer left
- <kbd>Right Arrow</kbd>, <kbd>Gamepad Left Stick</kbd>: Steer right
- <kbd>U</kbd>, <kbd>Gamepad Select</kbd>, left-click speedometer: Change speedometer unit (m/s, km/h, mph)
- <kbd>C</kbd>, <kbd>Gamepad Y/Triangle</kbd>: Change camera (exterior, interior, top-down)
- <kbd>Escape</kbd>, <kbd>Gamepad D-Pad Up</kbd>: Go back to menu (press again to exit)
Language: GDScript
Renderer: Vulkan Clustered
Renderer: Forward Plus
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/524

View File

@@ -134,6 +134,12 @@ back={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
]
}
cycle_camera={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
]
}
[physics]

File diff suppressed because one or more lines are too long

View File

@@ -12,13 +12,13 @@
[ext_resource type="AudioStream" uid="uid://dpbayeeufya21" path="res://vehicles/impact_4.wav" id="9_bomp1"]
[ext_resource type="Texture2D" uid="uid://bju75l2w3r7vq" path="res://vehicles/blob_shadow.png" id="11_3ryw5"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_snohs"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_l7i2k"]
friction = 0.5
[sub_resource type="BoxShape3D" id="BoxShape3D_nldm2"]
[sub_resource type="BoxShape3D" id="BoxShape3D_x74tc"]
size = Vector3(0.954078, 1, 2.32662)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_r6uy4"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_bpr2q"]
streams_count = 4
random_pitch = 1.05
random_volume_offset_db = 2.0
@@ -31,7 +31,7 @@ stream_2/weight = 1.0
stream_3/stream = ExtResource("9_bomp1")
stream_3/weight = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qgr8p"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fuuj3"]
transparency = 1
shading_mode = 0
albedo_color = Color(0.462745, 0.462745, 0.462745, 0.501961)
@@ -43,10 +43,10 @@ particles_anim_loop = false
proximity_fade_enabled = true
proximity_fade_distance = 0.5
[sub_resource type="QuadMesh" id="QuadMesh_xaqv0"]
material = SubResource("StandardMaterial3D_qgr8p")
[sub_resource type="QuadMesh" id="QuadMesh_30wks"]
material = SubResource("StandardMaterial3D_fuuj3")
[sub_resource type="Curve" id="Curve_eeu5s"]
[sub_resource type="Curve" id="Curve_4j5vd"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
@@ -55,7 +55,7 @@ point_count = 2
[node name="Body" type="VehicleBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00169557, 0.222867, -0.0955184)
center_of_mass_mode = 1
physics_material_override = SubResource("PhysicsMaterial_snohs")
physics_material_override = SubResource("PhysicsMaterial_l7i2k")
script = ExtResource("1_r806m")
[node name="Wheel1" type="VehicleWheel3D" parent="Body"]
@@ -127,14 +127,13 @@ mesh = ExtResource("3_cqia8")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.588269, 0.0774262)
shape = SubResource("BoxShape3D_nldm2")
shape = SubResource("BoxShape3D_x74tc")
[node name="CameraBase" type="Node3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.97449, 0)
[node name="Camera3D" type="Camera3D" parent="Body/CameraBase"]
transform = Transform3D(-0.709652, -0.170177, 0.683691, -2.11161e-08, 0.970391, 0.241539, -0.704552, 0.171409, -0.68864, 3.44908, 2.03236, -4.39379)
current = true
fov = 74.0
near = 0.1
script = ExtResource("4_6igu8")
@@ -149,7 +148,7 @@ autoplay = true
attenuation_filter_cutoff_hz = 20500.0
[node name="ImpactSound" type="AudioStreamPlayer3D" parent="Body"]
stream = SubResource("AudioStreamRandomizer_r6uy4")
stream = SubResource("AudioStreamRandomizer_bpr2q")
volume_db = -9.0
max_polyphony = 3
attenuation_filter_cutoff_hz = 20500.0
@@ -157,7 +156,7 @@ attenuation_filter_cutoff_hz = 20500.0
[node name="CPUParticles3D" type="CPUParticles3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.201696, -0.022867, -1.10448)
amount = 100
mesh = SubResource("QuadMesh_xaqv0")
mesh = SubResource("QuadMesh_30wks")
direction = Vector3(0, 1, -0.5)
gravity = Vector3(0, 0, 0)
initial_velocity_min = 1.0
@@ -165,7 +164,7 @@ initial_velocity_max = 1.0
damping_min = 0.05
damping_max = 0.05
angle_max = 360.0
scale_amount_curve = SubResource("Curve_eeu5s")
scale_amount_curve = SubResource("Curve_4j5vd")
[node name="BlobShadow" type="Decal" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.05)
@@ -174,3 +173,12 @@ texture_albedo = ExtResource("11_3ryw5")
upper_fade = 2.0
lower_fade = 1.0
cull_mask = 1048573
[node name="AudioListener3D" type="AudioListener3D" parent="Body"]
current = true
[node name="InteriorCameraPosition" type="Marker3D" parent="Body"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.9, 0.3)
[node name="TopDownCameraPosition" type="Marker3D" parent="Body"]
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)

View File

@@ -14,6 +14,10 @@ const FOV_CHANGE_MIN_SPEED = 0.05
@export var angle_v_adjust := 0.0
@export var height := 1.5
var camera_type := CameraType.EXTERIOR
var initial_transform := transform
var base_fov := fov
# The field of view to smoothly interpolate to.
@@ -22,28 +26,46 @@ var desired_fov := fov
# Position on the last physics frame (used to measure speed).
var previous_position := global_position
enum CameraType {
EXTERIOR,
INTERIOR,
TOP_DOWN,
MAX, # Represents the size of the CameraType enum.
}
func _ready():
# This detaches the camera transform from the parent spatial node.
set_as_top_level(true)
update_camera()
func _input(event):
if event.is_action_pressed(&"cycle_camera"):
camera_type = wrapi(camera_type + 1, 0, CameraType.MAX) as CameraType
update_camera()
func _physics_process(_delta):
var target: Vector3 = get_parent().global_transform.origin
var pos := global_transform.origin
if camera_type == CameraType.EXTERIOR:
var target: Vector3 = get_parent().global_transform.origin
var pos := global_transform.origin
var from_target := pos - target
var from_target := pos - target
# Check ranges.
if from_target.length() < min_distance:
from_target = from_target.normalized() * min_distance
elif from_target.length() > max_distance:
from_target = from_target.normalized() * max_distance
# Check ranges.
if from_target.length() < min_distance:
from_target = from_target.normalized() * min_distance
elif from_target.length() > max_distance:
from_target = from_target.normalized() * max_distance
from_target.y = height
from_target.y = height
pos = target + from_target
pos = target + from_target
look_at_from_position(pos, target, Vector3.UP)
look_at_from_position(pos, target, Vector3.UP)
elif camera_type == CameraType.TOP_DOWN:
position.x = get_parent().global_transform.origin.x
position.z = get_parent().global_transform.origin.z
# Force rotation to prevent camera from being slanted after switching cameras while on a slope.
rotation_degrees = Vector3(270, 180, 0)
# Dynamic field of view based on car speed, with smoothing to prevent sudden changes on impact.
desired_fov = clamp(base_fov + (abs(global_position.length() - previous_position.length()) - FOV_CHANGE_MIN_SPEED) * FOV_SPEED_FACTOR, base_fov, 100)
@@ -53,3 +75,17 @@ func _physics_process(_delta):
transform.basis = Basis(transform.basis[0], deg_to_rad(angle_v_adjust)) * transform.basis
previous_position = global_position
func update_camera():
match camera_type:
CameraType.EXTERIOR:
transform = initial_transform
CameraType.INTERIOR:
global_transform = get_node(^"../../InteriorCameraPosition").global_transform
CameraType.TOP_DOWN:
global_transform = get_node(^"../../TopDownCameraPosition").global_transform
# This detaches the camera transform from the parent spatial node, but only
# for exterior and top-down cameras.
set_as_top_level(camera_type != CameraType.INTERIOR)

View File

@@ -13,10 +13,10 @@
[ext_resource type="Texture2D" uid="uid://d4ostmqwgytk" path="res://vehicles/particle_smoke.png" id="10_lfosv"]
[ext_resource type="Texture2D" uid="uid://bju75l2w3r7vq" path="res://vehicles/blob_shadow.png" id="11_5ul8v"]
[sub_resource type="BoxShape3D" id="BoxShape3D_mndia"]
[sub_resource type="BoxShape3D" id="BoxShape3D_0hbge"]
size = Vector3(1.17624, 0.6963, 2.23996)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_4grku"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_aad58"]
streams_count = 4
random_pitch = 1.05
random_volume_offset_db = 2.0
@@ -29,7 +29,7 @@ stream_2/weight = 1.0
stream_3/stream = ExtResource("9_y8ei3")
stream_3/weight = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yisei"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_atib4"]
transparency = 1
shading_mode = 0
albedo_color = Color(0.462745, 0.462745, 0.462745, 0.501961)
@@ -41,52 +41,52 @@ particles_anim_loop = false
proximity_fade_enabled = true
proximity_fade_distance = 0.5
[sub_resource type="QuadMesh" id="QuadMesh_n707q"]
material = SubResource("StandardMaterial3D_yisei")
[sub_resource type="QuadMesh" id="QuadMesh_xsbig"]
material = SubResource("StandardMaterial3D_atib4")
[sub_resource type="Curve" id="Curve_wki0f"]
[sub_resource type="Curve" id="Curve_kr6si"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CapsuleMesh" id="CapsuleMesh_opure"]
[sub_resource type="CapsuleMesh" id="CapsuleMesh_i2aww"]
radius = 0.05
height = 0.42
radial_segments = 12
rings = 3
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qdagn"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nrety"]
albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
metallic = 1.0
roughness = 0.5
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_7j1n4"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eoojf"]
radius = 0.05
height = 0.3
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fxjgk"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_so248"]
albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
metallic = 1.0
roughness = 0.5
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8aiwr"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c2qj1"]
albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
metallic = 1.0
roughness = 0.5
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0rxuy"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ffy5m"]
albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
metallic = 1.0
roughness = 0.5
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_d1sy5"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_l1evv"]
albedo_color = Color(0.635294, 0.635294, 0.635294, 1)
metallic = 1.0
roughness = 0.5
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_rt64b"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_hvgqm"]
friction = 0.5
[sub_resource type="BoxShape3D" id="BoxShape3D_xe02x"]
[sub_resource type="BoxShape3D" id="BoxShape3D_hbuqf"]
size = Vector3(0.954078, 1, 2.32662)
[node name="TowTruck" type="Node3D"]
@@ -174,7 +174,7 @@ height = 1.75
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.391365, 0.158069)
shape = SubResource("BoxShape3D_mndia")
shape = SubResource("BoxShape3D_0hbge")
[node name="EngineSound" type="AudioStreamPlayer3D" parent="Body"]
stream = ExtResource("5_fwfew")
@@ -184,7 +184,7 @@ attenuation_filter_cutoff_hz = 20500.0
[node name="ImpactSound" type="AudioStreamPlayer3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.391365, 0.158069)
stream = SubResource("AudioStreamRandomizer_4grku")
stream = SubResource("AudioStreamRandomizer_aad58")
volume_db = -9.0
max_polyphony = 3
attenuation_filter_cutoff_hz = 20500.0
@@ -192,7 +192,7 @@ attenuation_filter_cutoff_hz = 20500.0
[node name="CPUParticles3D" type="CPUParticles3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.201696, -0.022867, -1.10448)
amount = 100
mesh = SubResource("QuadMesh_n707q")
mesh = SubResource("QuadMesh_xsbig")
direction = Vector3(0, 1, -0.5)
gravity = Vector3(0, 0, 0)
initial_velocity_min = 1.0
@@ -200,7 +200,7 @@ initial_velocity_max = 1.0
damping_min = 0.05
damping_max = 0.05
angle_max = 360.0
scale_amount_curve = SubResource("Curve_wki0f")
scale_amount_curve = SubResource("Curve_kr6si")
[node name="BlobShadow" type="Decal" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00169557, -0.222867, 0.145518)
@@ -210,17 +210,26 @@ upper_fade = 2.0
lower_fade = 1.0
cull_mask = 1048573
[node name="AudioListener3D" type="AudioListener3D" parent="Body"]
current = true
[node name="InteriorCameraPosition" type="Marker3D" parent="Body"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.9, 0.3)
[node name="TopDownCameraPosition" type="Marker3D" parent="Body"]
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)
[node name="ChainB1" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0, 1.10846, -1.55698)
[node name="Chain1" type="MeshInstance3D" parent="ChainB1"]
layers = 2
gi_mode = 2
mesh = SubResource("CapsuleMesh_opure")
surface_material_override/0 = SubResource("StandardMaterial3D_qdagn")
mesh = SubResource("CapsuleMesh_i2aww")
surface_material_override/0 = SubResource("StandardMaterial3D_nrety")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB1"]
shape = SubResource("CapsuleShape3D_7j1n4")
shape = SubResource("CapsuleShape3D_eoojf")
[node name="ChainB2" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0, 0.803378, -1.75806)
@@ -228,11 +237,11 @@ transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0,
[node name="Chain1" type="MeshInstance3D" parent="ChainB2"]
layers = 2
gi_mode = 2
mesh = SubResource("CapsuleMesh_opure")
surface_material_override/0 = SubResource("StandardMaterial3D_fxjgk")
mesh = SubResource("CapsuleMesh_i2aww")
surface_material_override/0 = SubResource("StandardMaterial3D_so248")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB2"]
shape = SubResource("CapsuleShape3D_7j1n4")
shape = SubResource("CapsuleShape3D_eoojf")
[node name="ChainB3" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0, 0.490045, -1.96106)
@@ -240,11 +249,11 @@ transform = Transform3D(1, 0, 0, 0, 0.846248, -0.53279, 0, 0.53279, 0.846248, 0,
[node name="Chain1" type="MeshInstance3D" parent="ChainB3"]
layers = 2
gi_mode = 2
mesh = SubResource("CapsuleMesh_opure")
surface_material_override/0 = SubResource("StandardMaterial3D_8aiwr")
mesh = SubResource("CapsuleMesh_i2aww")
surface_material_override/0 = SubResource("StandardMaterial3D_c2qj1")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB3"]
shape = SubResource("CapsuleShape3D_7j1n4")
shape = SubResource("CapsuleShape3D_eoojf")
[node name="ChainB4" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.447167, -0.894451, 0, 0.894451, 0.447167, 0, 0.290326, -2.19413)
@@ -252,11 +261,11 @@ transform = Transform3D(1, 0, 0, 0, 0.447167, -0.894451, 0, 0.894451, 0.447167,
[node name="Chain1" type="MeshInstance3D" parent="ChainB4"]
layers = 2
gi_mode = 2
mesh = SubResource("CapsuleMesh_opure")
surface_material_override/0 = SubResource("StandardMaterial3D_0rxuy")
mesh = SubResource("CapsuleMesh_i2aww")
surface_material_override/0 = SubResource("StandardMaterial3D_ffy5m")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB4"]
shape = SubResource("CapsuleShape3D_7j1n4")
shape = SubResource("CapsuleShape3D_eoojf")
[node name="ChainB5" type="RigidBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.0993884, -0.995049, 0, 0.995049, 0.0993884, 0, 0.205717, -2.50193)
@@ -264,11 +273,11 @@ transform = Transform3D(1, 0, 0, 0, 0.0993884, -0.995049, 0, 0.995049, 0.0993884
[node name="Chain1" type="MeshInstance3D" parent="ChainB5"]
layers = 2
gi_mode = 2
mesh = SubResource("CapsuleMesh_opure")
surface_material_override/0 = SubResource("StandardMaterial3D_d1sy5")
mesh = SubResource("CapsuleMesh_i2aww")
surface_material_override/0 = SubResource("StandardMaterial3D_l1evv")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ChainB5"]
shape = SubResource("CapsuleShape3D_7j1n4")
shape = SubResource("CapsuleShape3D_eoojf")
[node name="PinJoint1" type="PinJoint3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.28044, -1.4153)
@@ -302,7 +311,7 @@ params/bias = 0.5
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00169557, 0.222867, -3.97518)
mass = 10.0
center_of_mass_mode = 1
physics_material_override = SubResource("PhysicsMaterial_rt64b")
physics_material_override = SubResource("PhysicsMaterial_hvgqm")
[node name="Wheel1" type="VehicleWheel3D" parent="Body2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.573678, 0.115169, 1.10416)
@@ -373,7 +382,7 @@ mesh = ExtResource("5_04cnp")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.588269, 0.0774262)
shape = SubResource("BoxShape3D_xe02x")
shape = SubResource("BoxShape3D_hbuqf")
[node name="BlobShadow" type="Decal" parent="Body2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00169557, -0.122867, 0.0251799)

View File

@@ -13,10 +13,10 @@
[ext_resource type="Texture2D" uid="uid://d4ostmqwgytk" path="res://vehicles/particle_smoke.png" id="10_5qary"]
[ext_resource type="Texture2D" uid="uid://bju75l2w3r7vq" path="res://vehicles/blob_shadow.png" id="11_ifj1h"]
[sub_resource type="BoxShape3D" id="BoxShape3D_vr27e"]
[sub_resource type="BoxShape3D" id="BoxShape3D_itmot"]
size = Vector3(1.3392, 1.04159, 2.3947)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_c1muu"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_xu0em"]
streams_count = 4
random_pitch = 1.05
random_volume_offset_db = 2.0
@@ -29,7 +29,7 @@ stream_2/weight = 1.0
stream_3/stream = ExtResource("9_11toc")
stream_3/weight = 1.0
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mkmb8"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_u6m2g"]
transparency = 1
shading_mode = 0
albedo_color = Color(0.462745, 0.462745, 0.462745, 0.501961)
@@ -41,14 +41,14 @@ particles_anim_loop = false
proximity_fade_enabled = true
proximity_fade_distance = 0.5
[sub_resource type="QuadMesh" id="QuadMesh_2ejxv"]
material = SubResource("StandardMaterial3D_mkmb8")
[sub_resource type="QuadMesh" id="QuadMesh_q42ka"]
material = SubResource("StandardMaterial3D_u6m2g")
[sub_resource type="Curve" id="Curve_vul88"]
[sub_resource type="Curve" id="Curve_n4o5r"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="BoxShape3D" id="BoxShape3D_yi2o3"]
[sub_resource type="BoxShape3D" id="BoxShape3D_dpscj"]
size = Vector3(1.49783, 1.38835, 3.94168)
[node name="TrailerTruck" type="Node3D"]
@@ -123,7 +123,7 @@ mesh = ExtResource("3_t1je7")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.571059, 0.132248)
shape = SubResource("BoxShape3D_vr27e")
shape = SubResource("BoxShape3D_itmot")
[node name="CameraBase" type="Node3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.97449, 0)
@@ -147,7 +147,7 @@ attenuation_filter_cutoff_hz = 20500.0
[node name="ImpactSound" type="AudioStreamPlayer3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00169557, -0.222867, 0.0955184)
stream = SubResource("AudioStreamRandomizer_c1muu")
stream = SubResource("AudioStreamRandomizer_xu0em")
volume_db = -9.0
max_polyphony = 3
attenuation_filter_cutoff_hz = 20500.0
@@ -155,7 +155,7 @@ attenuation_filter_cutoff_hz = 20500.0
[node name="CPUParticles3D" type="CPUParticles3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.201696, -0.022867, -1.10448)
amount = 100
mesh = SubResource("QuadMesh_2ejxv")
mesh = SubResource("QuadMesh_q42ka")
direction = Vector3(0, 1, -0.5)
gravity = Vector3(0, 0, 0)
initial_velocity_min = 1.0
@@ -163,7 +163,7 @@ initial_velocity_max = 1.0
damping_min = 0.05
damping_max = 0.05
angle_max = 360.0
scale_amount_curve = SubResource("Curve_vul88")
scale_amount_curve = SubResource("Curve_n4o5r")
[node name="BlobShadow" type="Decal" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00169557, -0.222867, 0.145518)
@@ -173,6 +173,15 @@ upper_fade = 2.0
lower_fade = 1.0
cull_mask = 1048573
[node name="AudioListener3D" type="AudioListener3D" parent="Body"]
current = true
[node name="InteriorCameraPosition" type="Marker3D" parent="Body"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.9, 0.3)
[node name="TopDownCameraPosition" type="Marker3D" parent="Body"]
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)
[node name="Trailer" type="VehicleBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00169557, 0.637902, -2.78118)
center_of_mass_mode = 1
@@ -244,7 +253,7 @@ cull_mask = 1048573
[node name="CollisionShape3D" type="CollisionShape3D" parent="Trailer"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.383046, -0.0335202)
shape = SubResource("BoxShape3D_yi2o3")
shape = SubResource("BoxShape3D_dpscj")
[node name="BlobShadow" type="Decal" parent="Trailer"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.003, -0.661, -1.05)