From 55934859e3d738d30c1a0dc0f1eef0b891b7130f Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 17 Jan 2023 21:39:18 +0100 Subject: [PATCH] Add camera selection to Truck Town (#820) --- 3d/truck_town/README.md | 12 +- 3d/truck_town/project.godot | 6 + 3d/truck_town/town/town_scene.tscn | 146 +++++++++++----------- 3d/truck_town/vehicles/car_base.tscn | 34 +++-- 3d/truck_town/vehicles/follow_camera.gd | 62 +++++++-- 3d/truck_town/vehicles/tow_truck.tscn | 81 ++++++------ 3d/truck_town/vehicles/trailer_truck.tscn | 33 +++-- 7 files changed, 226 insertions(+), 148 deletions(-) diff --git a/3d/truck_town/README.md b/3d/truck_town/README.md index 81bfbbe0..c2fd50cb 100644 --- a/3d/truck_town/README.md +++ b/3d/truck_town/README.md @@ -3,9 +3,19 @@ This is a demo implementing different types of trucks of varying complexity using vehicle physics. +Controls: + +- Up Arrow, W, Gamepad Right Trigger, Gamepad A/Cross: Accelerate +- Down Arrow, S, Gamepad Left Trigger, Gamepad B/Circle : Brake +- Left Arrow, Gamepad Left Stick: Steer left +- Right Arrow, Gamepad Left Stick: Steer right +- U, Gamepad Select, left-click speedometer: Change speedometer unit (m/s, km/h, mph) +- C, Gamepad Y/Triangle: Change camera (exterior, interior, top-down) +- Escape, Gamepad D-Pad Up: 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 diff --git a/3d/truck_town/project.godot b/3d/truck_town/project.godot index 46589cc7..ce118731 100644 --- a/3d/truck_town/project.godot +++ b/3d/truck_town/project.godot @@ -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] diff --git a/3d/truck_town/town/town_scene.tscn b/3d/truck_town/town/town_scene.tscn index 4a41e560..dc7effbb 100644 --- a/3d/truck_town/town/town_scene.tscn +++ b/3d/truck_town/town/town_scene.tscn @@ -6,95 +6,95 @@ [ext_resource type="Texture2D" uid="uid://b2g4dq0w72e68" path="res://town/materials/grass.webp" id="4_cymw0"] [ext_resource type="Material" uid="uid://bdjiubscxkdn6" path="res://town/materials/cement.tres" id="5_83ty7"] -[sub_resource type="InputEventAction" id="InputEventAction_ulcw2"] +[sub_resource type="InputEventAction" id="InputEventAction_a4722"] action = &"cycle_speedometer_unit" -[sub_resource type="Shortcut" id="Shortcut_r8gsr"] -events = [SubResource("InputEventAction_ulcw2")] +[sub_resource type="Shortcut" id="Shortcut_msvqx"] +events = [SubResource("InputEventAction_a4722")] -[sub_resource type="BoxMesh" id="BoxMesh_ds7l2"] +[sub_resource type="BoxMesh" id="BoxMesh_x3c0g"] size = Vector3(4096, 1, 4096) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_w8yqu"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0ud3l"] albedo_texture = ExtResource("4_cymw0") roughness = 0.8 uv1_scale = Vector3(128, 64, 1) texture_filter = 5 -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_mi6nf"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_gearx"] data = PackedVector3Array(-2048, 0.5, 2048, 2048, 0.5, 2048, -2048, -0.5, 2048, 2048, 0.5, 2048, 2048, -0.5, 2048, -2048, -0.5, 2048, 2048, 0.5, -2048, -2048, 0.5, -2048, 2048, -0.5, -2048, -2048, 0.5, -2048, -2048, -0.5, -2048, 2048, -0.5, -2048, 2048, 0.5, 2048, 2048, 0.5, -2048, 2048, -0.5, 2048, 2048, 0.5, -2048, 2048, -0.5, -2048, 2048, -0.5, 2048, -2048, 0.5, -2048, -2048, 0.5, 2048, -2048, -0.5, -2048, -2048, 0.5, 2048, -2048, -0.5, 2048, -2048, -0.5, -2048, 2048, 0.5, 2048, -2048, 0.5, 2048, 2048, 0.5, -2048, -2048, 0.5, 2048, -2048, 0.5, -2048, 2048, 0.5, -2048, -2048, -0.5, 2048, 2048, -0.5, 2048, -2048, -0.5, -2048, 2048, -0.5, 2048, 2048, -0.5, -2048, -2048, -0.5, -2048) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_uw685"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_g7q2f"] data = PackedVector3Array(-2048, 0.5, 2048, 2048, 0.5, 2048, -2048, -0.5, 2048, 2048, 0.5, 2048, 2048, -0.5, 2048, -2048, -0.5, 2048, 2048, 0.5, -2048, -2048, 0.5, -2048, 2048, -0.5, -2048, -2048, 0.5, -2048, -2048, -0.5, -2048, 2048, -0.5, -2048, 2048, 0.5, 2048, 2048, 0.5, -2048, 2048, -0.5, 2048, 2048, 0.5, -2048, 2048, -0.5, -2048, 2048, -0.5, 2048, -2048, 0.5, -2048, -2048, 0.5, 2048, -2048, -0.5, -2048, -2048, 0.5, 2048, -2048, -0.5, 2048, -2048, -0.5, -2048, 2048, 0.5, 2048, -2048, 0.5, 2048, 2048, 0.5, -2048, -2048, 0.5, 2048, -2048, 0.5, -2048, 2048, 0.5, -2048, -2048, -0.5, 2048, 2048, -0.5, 2048, -2048, -0.5, -2048, 2048, -0.5, 2048, 2048, -0.5, -2048, -2048, -0.5, -2048) -[sub_resource type="BoxMesh" id="BoxMesh_47rhw"] +[sub_resource type="BoxMesh" id="BoxMesh_n528d"] size = Vector3(1990, 1, 93.75) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_jp38k"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_aijyr"] albedo_texture = ExtResource("4_cymw0") roughness = 0.8 uv1_scale = Vector3(128, 2, 1) texture_filter = 5 -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_va4bq"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_mb5rx"] data = PackedVector3Array(-995, 0.5, 47.017, 995, 0.5, 47.017, -995, -0.5, 47.017, 995, 0.5, 47.017, 995, -0.5, 47.017, -995, -0.5, 47.017, 995, 0.5, -47.017, -995, 0.5, -47.017, 995, -0.5, -47.017, -995, 0.5, -47.017, -995, -0.5, -47.017, 995, -0.5, -47.017, 995, 0.5, 47.017, 995, 0.5, -47.017, 995, -0.5, 47.017, 995, 0.5, -47.017, 995, -0.5, -47.017, 995, -0.5, 47.017, -995, 0.5, -47.017, -995, 0.5, 47.017, -995, -0.5, -47.017, -995, 0.5, 47.017, -995, -0.5, 47.017, -995, -0.5, -47.017, 995, 0.5, 47.017, -995, 0.5, 47.017, 995, 0.5, -47.017, -995, 0.5, 47.017, -995, 0.5, -47.017, 995, 0.5, -47.017, -995, -0.5, 47.017, 995, -0.5, 47.017, -995, -0.5, -47.017, 995, -0.5, 47.017, 995, -0.5, -47.017, -995, -0.5, -47.017) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ibj2n"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_3wmyg"] data = PackedVector3Array(-995, 0.5, 47.017, 995, 0.5, 47.017, -995, -0.5, 47.017, 995, 0.5, 47.017, 995, -0.5, 47.017, -995, -0.5, 47.017, 995, 0.5, -47.017, -995, 0.5, -47.017, 995, -0.5, -47.017, -995, 0.5, -47.017, -995, -0.5, -47.017, 995, -0.5, -47.017, 995, 0.5, 47.017, 995, 0.5, -47.017, 995, -0.5, 47.017, 995, 0.5, -47.017, 995, -0.5, -47.017, 995, -0.5, 47.017, -995, 0.5, -47.017, -995, 0.5, 47.017, -995, -0.5, -47.017, -995, 0.5, 47.017, -995, -0.5, 47.017, -995, -0.5, -47.017, 995, 0.5, 47.017, -995, 0.5, 47.017, 995, 0.5, -47.017, -995, 0.5, 47.017, -995, 0.5, -47.017, 995, 0.5, -47.017, -995, -0.5, 47.017, 995, -0.5, 47.017, -995, -0.5, -47.017, 995, -0.5, 47.017, 995, -0.5, -47.017, -995, -0.5, -47.017) -[sub_resource type="Curve3D" id="Curve3D_qvxke"] +[sub_resource type="Curve3D" id="Curve3D_6vskq"] _data = { "points": PackedVector3Array(0.543398, -0.103395, 1.65241, -0.543398, 0.103395, -1.65241, 3.28336, 5.28308, -55.2298, -0.833012, -0.217682, 2.2701, 0.833012, 0.217682, -2.2701, 3.56751, 6.35417, -60.6377, -0.0791855, 0.892603, 1.8625, 0.0791855, -0.892603, -1.8625, 5.02051, 4.0616, -66.9724, -0.149003, 0.23034, 1.52293, 0.149003, -0.23034, -1.52293, 5.94106, 1.27618, -73.7061, 0.152164, 0.0198116, 0.82222, -0.152164, -0.0198116, -0.82222, 6.24068, 1.29284, -81.1135, 0.709167, -0.00765228, 0.797897, -0.709167, 0.00765228, -0.797897, 1.66464, 0.49591, -92.5504, 1.86497, 0.492211, 1.35976, -1.86497, -0.492211, -1.35976, -5.43053, -0.176876, -98.7249, 3.65234, 0.403153, 0.595093, -3.65234, -0.403153, -0.595093, -14.2107, -2.83686, -102.669, 2.41666, 0.162499, -0.433556, -2.41666, -0.162499, 0.433556, -23.5045, -3.81825, -104.349, 2.69847, 0.0319109, -1.39461, -2.69847, -0.0319109, 1.39461, -32.5873, -4.93983, -102.986, 0, 0, 0, 0, 0, 0, -41.6334, -4.712, -100.865, 0, 0, 0, 0, 0, 0, -46.381, -4.47723, -99.9369, 1.76731, -0.395488, -0.332947, -1.76731, 0.395488, 0.332947, -48.5051, -4.01378, -99.6217, 1.47411, -0.793471, -0.42971, -1.47411, 0.793471, 0.42971, -52.9601, -1.59774, -98.743, 1.40203, -0.0544708, -0.311745, -1.40203, 0.0544708, 0.311745, -57.3469, -0.190034, -97.9515, 1.23469, 0.514086, -0.296593, -1.23469, -0.514086, 0.296593, -61.54, -0.983026, -97.2347, 1.78854, 0.324845, -0.419327, -1.78854, -0.324845, 0.419327, -65.8922, -3.47315, -96.0933, 4.19576, 0.234449, -0.89743, -4.19576, -0.234449, 0.89743, -72.3135, -4.084, -94.5145, 1.25638, 0.000484467, 10.8308, -1.25638, -0.000484467, -10.8308, -85.2469, -4.12423, -100.301, -2.00005, 0.315476, 0.567215, 2.00005, -0.315476, -0.567215, -79.6224, -4.49219, -111.463, -7.05647, 0.0288595, -2.48302, 6.90189, -0.0282273, 2.42863, -62.2289, -4.22628, -112.062, 0.259935, -0.461171, -3.92209, -0.738754, 1.31068, 11.1469, -57.1626, -4.54992, -98.6082, 2.09652, -0.278773, -0.0627518, -2.09652, 0.278773, 0.0627518, -73.0278, -2.4152, -85.6188, 2.88116, -0.17606, -0.0584183, -2.88116, 0.17606, 0.0584183, -83.2919, -2.37169, -84.7517, 3.23965, -0.202814, -1.03859, -3.23965, 0.202814, 1.03859, -101.697, -1.14444, -83.4727, 2.30534, -0.119607, -2.03248, -2.30534, 0.119607, 2.03248, -117.54, 0.480612, -77.5978, 1.62395, -0.460591, -1.66295, -1.62395, 0.460591, 1.66295, -128.78, 2.73801, -72.081, 0.623291, -0.0807109, -1.60843, -0.623291, 0.0807109, 1.60843, -142.737, 4.67136, -61.0967, -0.62944, -0.367424, -3.50014, 0.62944, 0.367424, 3.50014, -144.324, 4.46733, -50.0448, -1.81136, -0.102165, -1.03172, 1.81136, 0.102165, 1.03172, -137.273, 4.46672, -42.9261, -0.912231, -0.160881, -0.155205, 0.912231, 0.160881, 0.155205, -130.732, 4.37322, -42.3592, -1.12225, 0.309475, -0.159954, 1.12225, -0.309475, 0.159954, -127.167, 4.13784, -41.615, -1.44321, 0.289954, -0.16938, 1.44321, -0.289954, 0.16938, -123.841, 2.59092, -41.3764, -1.71183, 0.232457, -0.163383, 1.71183, -0.232457, 0.163383, -119.037, 2.92625, -40.5647, -1.65579, 0.0589757, -0.114311, 1.65579, -0.0589757, 0.114311, -115.158, 1.3437, -40.4409, -1.32726, 0.0452385, -0.0909462, 1.32726, -0.0452385, 0.0909462, -109.915, 2.63164, -39.7556, -1.40851, 0.0955319, -0.112408, 1.40851, -0.0955319, 0.112408, -106.253, 0.993988, -39.5967, -1.74428, 0.116143, -0.0901184, 1.74428, -0.116143, 0.0901184, -98.305, -0.669029, -38.2801, -1.98921, -1.76747, 0.459106, 1.98921, 1.76747, -0.459106, -87.2684, 1.03817, -38.1925, 0, 0, 0, 0, 0, 0, -80.2635, 2.10998, -38.466), "tilts": PackedFloat32Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) } point_count = 40 -[sub_resource type="TorusMesh" id="TorusMesh_sk6m6"] +[sub_resource type="TorusMesh" id="TorusMesh_jqadq"] inner_radius = 3.5 outer_radius = 7.0 -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rbi6m"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_5qgna"] albedo_color = Color(0.215902, 0.215902, 0.215902, 1) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_gf7tp"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_smisc"] data = PackedVector3Array(-1.3394, 0, -3.2336, 0, 1.2374, -4.0126, 0, 0, -3.5, -1.3394, 0, -3.2336, -1.5355, 1.2374, -3.7071, 0, 1.2374, -4.0126, -1.5355, 1.2374, -3.7071, 0, 1.75, -5.25, 0, 1.2374, -4.0126, -1.5355, 1.2374, -3.7071, -2.0091, 1.75, -4.8504, 0, 1.75, -5.25, -2.0091, 1.75, -4.8504, 0, 1.2374, -6.4874, 0, 1.75, -5.25, -2.0091, 1.75, -4.8504, -2.4826, 1.2374, -5.9936, 0, 1.2374, -6.4874, -2.4826, 1.2374, -5.9936, 0, 0, -7, 0, 1.2374, -6.4874, -2.4826, 1.2374, -5.9936, -2.6788, 0, -6.4672, 0, 0, -7, -2.6788, 0, -6.4672, 0, -1.2374, -6.4874, 0, 0, -7, -2.6788, 0, -6.4672, -2.4826, -1.2374, -5.9936, 0, -1.2374, -6.4874, -2.4826, -1.2374, -5.9936, 0, -1.75, -5.25, 0, -1.2374, -6.4874, -2.4826, -1.2374, -5.9936, -2.0091, -1.75, -4.8504, 0, -1.75, -5.25, -2.0091, -1.75, -4.8504, 0, -1.2374, -4.0126, 0, -1.75, -5.25, -2.0091, -1.75, -4.8504, -1.5355, -1.2374, -3.7071, 0, -1.2374, -4.0126, -1.5355, -1.2374, -3.7071, 0, 0, -3.5, 0, -1.2374, -4.0126, -1.5355, -1.2374, -3.7071, -1.3394, 0, -3.2336, 0, 0, -3.5, -2.4749, 0, -2.4749, -1.5355, 1.2374, -3.7071, -1.3394, 0, -3.2336, -2.4749, 0, -2.4749, -2.8373, 1.2374, -2.8373, -1.5355, 1.2374, -3.7071, -2.8373, 1.2374, -2.8373, -2.0091, 1.75, -4.8504, -1.5355, 1.2374, -3.7071, -2.8373, 1.2374, -2.8373, -3.7123, 1.75, -3.7123, -2.0091, 1.75, -4.8504, -3.7123, 1.75, -3.7123, -2.4826, 1.2374, -5.9936, -2.0091, 1.75, -4.8504, -3.7123, 1.75, -3.7123, -4.5873, 1.2374, -4.5873, -2.4826, 1.2374, -5.9936, -4.5873, 1.2374, -4.5873, -2.6788, 0, -6.4672, -2.4826, 1.2374, -5.9936, -4.5873, 1.2374, -4.5873, -4.9497, 0, -4.9497, -2.6788, 0, -6.4672, -4.9497, 0, -4.9497, -2.4826, -1.2374, -5.9936, -2.6788, 0, -6.4672, -4.9497, 0, -4.9497, -4.5873, -1.2374, -4.5873, -2.4826, -1.2374, -5.9936, -4.5873, -1.2374, -4.5873, -2.0091, -1.75, -4.8504, -2.4826, -1.2374, -5.9936, -4.5873, -1.2374, -4.5873, -3.7123, -1.75, -3.7123, -2.0091, -1.75, -4.8504, -3.7123, -1.75, -3.7123, -1.5355, -1.2374, -3.7071, -2.0091, -1.75, -4.8504, -3.7123, -1.75, -3.7123, -2.8373, -1.2374, -2.8373, -1.5355, -1.2374, -3.7071, -2.8373, -1.2374, -2.8373, -1.3394, 0, -3.2336, -1.5355, -1.2374, -3.7071, -2.8373, -1.2374, -2.8373, -2.4749, 0, -2.4749, -1.3394, 0, -3.2336, -3.2336, 0, -1.3394, -2.8373, 1.2374, -2.8373, -2.4749, 0, -2.4749, -3.2336, 0, -1.3394, -3.7071, 1.2374, -1.5355, -2.8373, 1.2374, -2.8373, -3.7071, 1.2374, -1.5355, -3.7123, 1.75, -3.7123, -2.8373, 1.2374, -2.8373, -3.7071, 1.2374, -1.5355, -4.8504, 1.75, -2.0091, -3.7123, 1.75, -3.7123, -4.8504, 1.75, -2.0091, -4.5873, 1.2374, -4.5873, -3.7123, 1.75, -3.7123, -4.8504, 1.75, -2.0091, -5.9936, 1.2374, -2.4826, -4.5873, 1.2374, -4.5873, -5.9936, 1.2374, -2.4826, -4.9497, 0, -4.9497, -4.5873, 1.2374, -4.5873, -5.9936, 1.2374, -2.4826, -6.4672, 0, -2.6788, -4.9497, 0, -4.9497, -6.4672, 0, -2.6788, -4.5873, -1.2374, -4.5873, -4.9497, 0, -4.9497, -6.4672, 0, -2.6788, -5.9936, -1.2374, -2.4826, -4.5873, -1.2374, -4.5873, -5.9936, -1.2374, -2.4826, -3.7123, -1.75, -3.7123, -4.5873, -1.2374, -4.5873, -5.9936, -1.2374, -2.4826, -4.8504, -1.75, -2.0091, -3.7123, -1.75, -3.7123, -4.8504, -1.75, -2.0091, -2.8373, -1.2374, -2.8373, -3.7123, -1.75, -3.7123, -4.8504, -1.75, -2.0091, -3.7071, -1.2374, -1.5355, -2.8373, -1.2374, -2.8373, -3.7071, -1.2374, -1.5355, -2.4749, 0, -2.4749, -2.8373, -1.2374, -2.8373, -3.7071, -1.2374, -1.5355, -3.2336, 0, -1.3394, -2.4749, 0, -2.4749, -3.5, 0, 0, -3.7071, 1.2374, -1.5355, -3.2336, 0, -1.3394, -3.5, 0, 0, -4.0126, 1.2374, 0, -3.7071, 1.2374, -1.5355, -4.0126, 1.2374, 0, -4.8504, 1.75, -2.0091, -3.7071, 1.2374, -1.5355, -4.0126, 1.2374, 0, -5.25, 1.75, 0, -4.8504, 1.75, -2.0091, -5.25, 1.75, 0, -5.9936, 1.2374, -2.4826, -4.8504, 1.75, -2.0091, -5.25, 1.75, 0, -6.4874, 1.2374, 0, -5.9936, 1.2374, -2.4826, -6.4874, 1.2374, 0, -6.4672, 0, -2.6788, -5.9936, 1.2374, -2.4826, -6.4874, 1.2374, 0, -7, 0, 0, -6.4672, 0, -2.6788, -7, 0, 0, -5.9936, -1.2374, -2.4826, -6.4672, 0, -2.6788, -7, 0, 0, -6.4874, -1.2374, 0, -5.9936, -1.2374, -2.4826, -6.4874, -1.2374, 0, -4.8504, -1.75, -2.0091, -5.9936, -1.2374, -2.4826, -6.4874, -1.2374, 0, -5.25, -1.75, 0, -4.8504, -1.75, -2.0091, -5.25, -1.75, 0, -3.7071, -1.2374, -1.5355, -4.8504, -1.75, -2.0091, -5.25, -1.75, 0, -4.0126, -1.2374, 0, -3.7071, -1.2374, -1.5355, -4.0126, -1.2374, 0, -3.2336, 0, -1.3394, -3.7071, -1.2374, -1.5355, -4.0126, -1.2374, 0, -3.5, 0, 0, -3.2336, 0, -1.3394, -3.2336, 0, 1.3394, -4.0126, 1.2374, 0, -3.5, 0, 0, -3.2336, 0, 1.3394, -3.7071, 1.2374, 1.5355, -4.0126, 1.2374, 0, -3.7071, 1.2374, 1.5355, -5.25, 1.75, 0, -4.0126, 1.2374, 0, -3.7071, 1.2374, 1.5355, -4.8504, 1.75, 2.0091, -5.25, 1.75, 0, -4.8504, 1.75, 2.0091, -6.4874, 1.2374, 0, -5.25, 1.75, 0, -4.8504, 1.75, 2.0091, -5.9936, 1.2374, 2.4826, -6.4874, 1.2374, 0, -5.9936, 1.2374, 2.4826, -7, 0, 0, -6.4874, 1.2374, 0, -5.9936, 1.2374, 2.4826, -6.4672, 0, 2.6788, -7, 0, 0, -6.4672, 0, 2.6788, -6.4874, -1.2374, 0, -7, 0, 0, -6.4672, 0, 2.6788, -5.9936, -1.2374, 2.4826, -6.4874, -1.2374, 0, -5.9936, -1.2374, 2.4826, -5.25, -1.75, 0, -6.4874, -1.2374, 0, -5.9936, -1.2374, 2.4826, -4.8504, -1.75, 2.0091, -5.25, -1.75, 0, -4.8504, -1.75, 2.0091, -4.0126, -1.2374, 0, -5.25, -1.75, 0, -4.8504, -1.75, 2.0091, -3.7071, -1.2374, 1.5355, -4.0126, -1.2374, 0, -3.7071, -1.2374, 1.5355, -3.5, 0, 0, -4.0126, -1.2374, 0, -3.7071, -1.2374, 1.5355, -3.2336, 0, 1.3394, -3.5, 0, 0, -2.4749, 0, 2.4749, -3.7071, 1.2374, 1.5355, -3.2336, 0, 1.3394, -2.4749, 0, 2.4749, -2.8373, 1.2374, 2.8373, -3.7071, 1.2374, 1.5355, -2.8373, 1.2374, 2.8373, -4.8504, 1.75, 2.0091, -3.7071, 1.2374, 1.5355, -2.8373, 1.2374, 2.8373, -3.7123, 1.75, 3.7123, -4.8504, 1.75, 2.0091, -3.7123, 1.75, 3.7123, -5.9936, 1.2374, 2.4826, -4.8504, 1.75, 2.0091, -3.7123, 1.75, 3.7123, -4.5873, 1.2374, 4.5873, -5.9936, 1.2374, 2.4826, -4.5873, 1.2374, 4.5873, -6.4672, 0, 2.6788, -5.9936, 1.2374, 2.4826, -4.5873, 1.2374, 4.5873, -4.9497, 0, 4.9497, -6.4672, 0, 2.6788, -4.9497, 0, 4.9497, -5.9936, -1.2374, 2.4826, -6.4672, 0, 2.6788, -4.9497, 0, 4.9497, -4.5873, -1.2374, 4.5873, -5.9936, -1.2374, 2.4826, -4.5873, -1.2374, 4.5873, -4.8504, -1.75, 2.0091, -5.9936, -1.2374, 2.4826, -4.5873, -1.2374, 4.5873, -3.7123, -1.75, 3.7123, -4.8504, -1.75, 2.0091, -3.7123, -1.75, 3.7123, -3.7071, -1.2374, 1.5355, -4.8504, -1.75, 2.0091, -3.7123, -1.75, 3.7123, -2.8373, -1.2374, 2.8373, -3.7071, -1.2374, 1.5355, -2.8373, -1.2374, 2.8373, -3.2336, 0, 1.3394, -3.7071, -1.2374, 1.5355, -2.8373, -1.2374, 2.8373, -2.4749, 0, 2.4749, -3.2336, 0, 1.3394, -1.3394, 0, 3.2336, -2.8373, 1.2374, 2.8373, -2.4749, 0, 2.4749, -1.3394, 0, 3.2336, -1.5355, 1.2374, 3.7071, -2.8373, 1.2374, 2.8373, -1.5355, 1.2374, 3.7071, -3.7123, 1.75, 3.7123, -2.8373, 1.2374, 2.8373, -1.5355, 1.2374, 3.7071, -2.0091, 1.75, 4.8504, -3.7123, 1.75, 3.7123, -2.0091, 1.75, 4.8504, -4.5873, 1.2374, 4.5873, -3.7123, 1.75, 3.7123, -2.0091, 1.75, 4.8504, -2.4826, 1.2374, 5.9936, -4.5873, 1.2374, 4.5873, -2.4826, 1.2374, 5.9936, -4.9497, 0, 4.9497, -4.5873, 1.2374, 4.5873, -2.4826, 1.2374, 5.9936, -2.6788, 0, 6.4672, -4.9497, 0, 4.9497, -2.6788, 0, 6.4672, -4.5873, -1.2374, 4.5873, -4.9497, 0, 4.9497, -2.6788, 0, 6.4672, -2.4826, -1.2374, 5.9936, -4.5873, -1.2374, 4.5873, -2.4826, -1.2374, 5.9936, -3.7123, -1.75, 3.7123, -4.5873, -1.2374, 4.5873, -2.4826, -1.2374, 5.9936, -2.0091, -1.75, 4.8504, -3.7123, -1.75, 3.7123, -2.0091, -1.75, 4.8504, -2.8373, -1.2374, 2.8373, -3.7123, -1.75, 3.7123, -2.0091, -1.75, 4.8504, -1.5355, -1.2374, 3.7071, -2.8373, -1.2374, 2.8373, -1.5355, -1.2374, 3.7071, -2.4749, 0, 2.4749, -2.8373, -1.2374, 2.8373, -1.5355, -1.2374, 3.7071, -1.3394, 0, 3.2336, -2.4749, 0, 2.4749, 0, 0, 3.5, -1.5355, 1.2374, 3.7071, -1.3394, 0, 3.2336, 0, 0, 3.5, 0, 1.2374, 4.0126, -1.5355, 1.2374, 3.7071, 0, 1.2374, 4.0126, -2.0091, 1.75, 4.8504, -1.5355, 1.2374, 3.7071, 0, 1.2374, 4.0126, 0, 1.75, 5.25, -2.0091, 1.75, 4.8504, 0, 1.75, 5.25, -2.4826, 1.2374, 5.9936, -2.0091, 1.75, 4.8504, 0, 1.75, 5.25, 0, 1.2374, 6.4874, -2.4826, 1.2374, 5.9936, 0, 1.2374, 6.4874, -2.6788, 0, 6.4672, -2.4826, 1.2374, 5.9936, 0, 1.2374, 6.4874, 0, 0, 7, -2.6788, 0, 6.4672, 0, 0, 7, -2.4826, -1.2374, 5.9936, -2.6788, 0, 6.4672, 0, 0, 7, 0, -1.2374, 6.4874, -2.4826, -1.2374, 5.9936, 0, -1.2374, 6.4874, -2.0091, -1.75, 4.8504, -2.4826, -1.2374, 5.9936, 0, -1.2374, 6.4874, 0, -1.75, 5.25, -2.0091, -1.75, 4.8504, 0, -1.75, 5.25, -1.5355, -1.2374, 3.7071, -2.0091, -1.75, 4.8504, 0, -1.75, 5.25, 0, -1.2374, 4.0126, -1.5355, -1.2374, 3.7071, 0, -1.2374, 4.0126, -1.3394, 0, 3.2336, -1.5355, -1.2374, 3.7071, 0, -1.2374, 4.0126, 0, 0, 3.5, -1.3394, 0, 3.2336, 1.3394, 0, 3.2336, 0, 1.2374, 4.0126, 0, 0, 3.5, 1.3394, 0, 3.2336, 1.5355, 1.2374, 3.7071, 0, 1.2374, 4.0126, 1.5355, 1.2374, 3.7071, 0, 1.75, 5.25, 0, 1.2374, 4.0126, 1.5355, 1.2374, 3.7071, 2.0091, 1.75, 4.8504, 0, 1.75, 5.25, 2.0091, 1.75, 4.8504, 0, 1.2374, 6.4874, 0, 1.75, 5.25, 2.0091, 1.75, 4.8504, 2.4826, 1.2374, 5.9936, 0, 1.2374, 6.4874, 2.4826, 1.2374, 5.9936, 0, 0, 7, 0, 1.2374, 6.4874, 2.4826, 1.2374, 5.9936, 2.6788, 0, 6.4672, 0, 0, 7, 2.6788, 0, 6.4672, 0, -1.2374, 6.4874, 0, 0, 7, 2.6788, 0, 6.4672, 2.4826, -1.2374, 5.9936, 0, -1.2374, 6.4874, 2.4826, -1.2374, 5.9936, 0, -1.75, 5.25, 0, -1.2374, 6.4874, 2.4826, -1.2374, 5.9936, 2.0091, -1.75, 4.8504, 0, -1.75, 5.25, 2.0091, -1.75, 4.8504, 0, -1.2374, 4.0126, 0, -1.75, 5.25, 2.0091, -1.75, 4.8504, 1.5355, -1.2374, 3.7071, 0, -1.2374, 4.0126, 1.5355, -1.2374, 3.7071, 0, 0, 3.5, 0, -1.2374, 4.0126, 1.5355, -1.2374, 3.7071, 1.3394, 0, 3.2336, 0, 0, 3.5, 2.4749, 0, 2.4749, 1.5355, 1.2374, 3.7071, 1.3394, 0, 3.2336, 2.4749, 0, 2.4749, 2.8373, 1.2374, 2.8373, 1.5355, 1.2374, 3.7071, 2.8373, 1.2374, 2.8373, 2.0091, 1.75, 4.8504, 1.5355, 1.2374, 3.7071, 2.8373, 1.2374, 2.8373, 3.7123, 1.75, 3.7123, 2.0091, 1.75, 4.8504, 3.7123, 1.75, 3.7123, 2.4826, 1.2374, 5.9936, 2.0091, 1.75, 4.8504, 3.7123, 1.75, 3.7123, 4.5873, 1.2374, 4.5873, 2.4826, 1.2374, 5.9936, 4.5873, 1.2374, 4.5873, 2.6788, 0, 6.4672, 2.4826, 1.2374, 5.9936, 4.5873, 1.2374, 4.5873, 4.9497, 0, 4.9497, 2.6788, 0, 6.4672, 4.9497, 0, 4.9497, 2.4826, -1.2374, 5.9936, 2.6788, 0, 6.4672, 4.9497, 0, 4.9497, 4.5873, -1.2374, 4.5873, 2.4826, -1.2374, 5.9936, 4.5873, -1.2374, 4.5873, 2.0091, -1.75, 4.8504, 2.4826, -1.2374, 5.9936, 4.5873, -1.2374, 4.5873, 3.7123, -1.75, 3.7123, 2.0091, -1.75, 4.8504, 3.7123, -1.75, 3.7123, 1.5355, -1.2374, 3.7071, 2.0091, -1.75, 4.8504, 3.7123, -1.75, 3.7123, 2.8373, -1.2374, 2.8373, 1.5355, -1.2374, 3.7071, 2.8373, -1.2374, 2.8373, 1.3394, 0, 3.2336, 1.5355, -1.2374, 3.7071, 2.8373, -1.2374, 2.8373, 2.4749, 0, 2.4749, 1.3394, 0, 3.2336, 3.2336, 0, 1.3394, 2.8373, 1.2374, 2.8373, 2.4749, 0, 2.4749, 3.2336, 0, 1.3394, 3.7071, 1.2374, 1.5355, 2.8373, 1.2374, 2.8373, 3.7071, 1.2374, 1.5355, 3.7123, 1.75, 3.7123, 2.8373, 1.2374, 2.8373, 3.7071, 1.2374, 1.5355, 4.8504, 1.75, 2.0091, 3.7123, 1.75, 3.7123, 4.8504, 1.75, 2.0091, 4.5873, 1.2374, 4.5873, 3.7123, 1.75, 3.7123, 4.8504, 1.75, 2.0091, 5.9936, 1.2374, 2.4826, 4.5873, 1.2374, 4.5873, 5.9936, 1.2374, 2.4826, 4.9497, 0, 4.9497, 4.5873, 1.2374, 4.5873, 5.9936, 1.2374, 2.4826, 6.4672, 0, 2.6788, 4.9497, 0, 4.9497, 6.4672, 0, 2.6788, 4.5873, -1.2374, 4.5873, 4.9497, 0, 4.9497, 6.4672, 0, 2.6788, 5.9936, -1.2374, 2.4826, 4.5873, -1.2374, 4.5873, 5.9936, -1.2374, 2.4826, 3.7123, -1.75, 3.7123, 4.5873, -1.2374, 4.5873, 5.9936, -1.2374, 2.4826, 4.8504, -1.75, 2.0091, 3.7123, -1.75, 3.7123, 4.8504, -1.75, 2.0091, 2.8373, -1.2374, 2.8373, 3.7123, -1.75, 3.7123, 4.8504, -1.75, 2.0091, 3.7071, -1.2374, 1.5355, 2.8373, -1.2374, 2.8373, 3.7071, -1.2374, 1.5355, 2.4749, 0, 2.4749, 2.8373, -1.2374, 2.8373, 3.7071, -1.2374, 1.5355, 3.2336, 0, 1.3394, 2.4749, 0, 2.4749, 3.5, 0, 0, 3.7071, 1.2374, 1.5355, 3.2336, 0, 1.3394, 3.5, 0, 0, 4.0126, 1.2374, 0, 3.7071, 1.2374, 1.5355, 4.0126, 1.2374, 0, 4.8504, 1.75, 2.0091, 3.7071, 1.2374, 1.5355, 4.0126, 1.2374, 0, 5.25, 1.75, 0, 4.8504, 1.75, 2.0091, 5.25, 1.75, 0, 5.9936, 1.2374, 2.4826, 4.8504, 1.75, 2.0091, 5.25, 1.75, 0, 6.4874, 1.2374, 0, 5.9936, 1.2374, 2.4826, 6.4874, 1.2374, 0, 6.4672, 0, 2.6788, 5.9936, 1.2374, 2.4826, 6.4874, 1.2374, 0, 7, 0, 0, 6.4672, 0, 2.6788, 7, 0, 0, 5.9936, -1.2374, 2.4826, 6.4672, 0, 2.6788, 7, 0, 0, 6.4874, -1.2374, 0, 5.9936, -1.2374, 2.4826, 6.4874, -1.2374, 0, 4.8504, -1.75, 2.0091, 5.9936, -1.2374, 2.4826, 6.4874, -1.2374, 0, 5.25, -1.75, 0, 4.8504, -1.75, 2.0091, 5.25, -1.75, 0, 3.7071, -1.2374, 1.5355, 4.8504, -1.75, 2.0091, 5.25, -1.75, 0, 4.0126, -1.2374, 0, 3.7071, -1.2374, 1.5355, 4.0126, -1.2374, 0, 3.2336, 0, 1.3394, 3.7071, -1.2374, 1.5355, 4.0126, -1.2374, 0, 3.5, 0, 0, 3.2336, 0, 1.3394, 3.2336, 0, -1.3394, 4.0126, 1.2374, 0, 3.5, 0, 0, 3.2336, 0, -1.3394, 3.7071, 1.2374, -1.5355, 4.0126, 1.2374, 0, 3.7071, 1.2374, -1.5355, 5.25, 1.75, 0, 4.0126, 1.2374, 0, 3.7071, 1.2374, -1.5355, 4.8504, 1.75, -2.0091, 5.25, 1.75, 0, 4.8504, 1.75, -2.0091, 6.4874, 1.2374, 0, 5.25, 1.75, 0, 4.8504, 1.75, -2.0091, 5.9936, 1.2374, -2.4826, 6.4874, 1.2374, 0, 5.9936, 1.2374, -2.4826, 7, 0, 0, 6.4874, 1.2374, 0, 5.9936, 1.2374, -2.4826, 6.4672, 0, -2.6788, 7, 0, 0, 6.4672, 0, -2.6788, 6.4874, -1.2374, 0, 7, 0, 0, 6.4672, 0, -2.6788, 5.9936, -1.2374, -2.4826, 6.4874, -1.2374, 0, 5.9936, -1.2374, -2.4826, 5.25, -1.75, 0, 6.4874, -1.2374, 0, 5.9936, -1.2374, -2.4826, 4.8504, -1.75, -2.0091, 5.25, -1.75, 0, 4.8504, -1.75, -2.0091, 4.0126, -1.2374, 0, 5.25, -1.75, 0, 4.8504, -1.75, -2.0091, 3.7071, -1.2374, -1.5355, 4.0126, -1.2374, 0, 3.7071, -1.2374, -1.5355, 3.5, 0, 0, 4.0126, -1.2374, 0, 3.7071, -1.2374, -1.5355, 3.2336, 0, -1.3394, 3.5, 0, 0, 2.4749, 0, -2.4749, 3.7071, 1.2374, -1.5355, 3.2336, 0, -1.3394, 2.4749, 0, -2.4749, 2.8373, 1.2374, -2.8373, 3.7071, 1.2374, -1.5355, 2.8373, 1.2374, -2.8373, 4.8504, 1.75, -2.0091, 3.7071, 1.2374, -1.5355, 2.8373, 1.2374, -2.8373, 3.7123, 1.75, -3.7123, 4.8504, 1.75, -2.0091, 3.7123, 1.75, -3.7123, 5.9936, 1.2374, -2.4826, 4.8504, 1.75, -2.0091, 3.7123, 1.75, -3.7123, 4.5873, 1.2374, -4.5873, 5.9936, 1.2374, -2.4826, 4.5873, 1.2374, -4.5873, 6.4672, 0, -2.6788, 5.9936, 1.2374, -2.4826, 4.5873, 1.2374, -4.5873, 4.9497, 0, -4.9497, 6.4672, 0, -2.6788, 4.9497, 0, -4.9497, 5.9936, -1.2374, -2.4826, 6.4672, 0, -2.6788, 4.9497, 0, -4.9497, 4.5873, -1.2374, -4.5873, 5.9936, -1.2374, -2.4826, 4.5873, -1.2374, -4.5873, 4.8504, -1.75, -2.0091, 5.9936, -1.2374, -2.4826, 4.5873, -1.2374, -4.5873, 3.7123, -1.75, -3.7123, 4.8504, -1.75, -2.0091, 3.7123, -1.75, -3.7123, 3.7071, -1.2374, -1.5355, 4.8504, -1.75, -2.0091, 3.7123, -1.75, -3.7123, 2.8373, -1.2374, -2.8373, 3.7071, -1.2374, -1.5355, 2.8373, -1.2374, -2.8373, 3.2336, 0, -1.3394, 3.7071, -1.2374, -1.5355, 2.8373, -1.2374, -2.8373, 2.4749, 0, -2.4749, 3.2336, 0, -1.3394, 1.3394, 0, -3.2336, 2.8373, 1.2374, -2.8373, 2.4749, 0, -2.4749, 1.3394, 0, -3.2336, 1.5355, 1.2374, -3.7071, 2.8373, 1.2374, -2.8373, 1.5355, 1.2374, -3.7071, 3.7123, 1.75, -3.7123, 2.8373, 1.2374, -2.8373, 1.5355, 1.2374, -3.7071, 2.0091, 1.75, -4.8504, 3.7123, 1.75, -3.7123, 2.0091, 1.75, -4.8504, 4.5873, 1.2374, -4.5873, 3.7123, 1.75, -3.7123, 2.0091, 1.75, -4.8504, 2.4826, 1.2374, -5.9936, 4.5873, 1.2374, -4.5873, 2.4826, 1.2374, -5.9936, 4.9497, 0, -4.9497, 4.5873, 1.2374, -4.5873, 2.4826, 1.2374, -5.9936, 2.6788, 0, -6.4672, 4.9497, 0, -4.9497, 2.6788, 0, -6.4672, 4.5873, -1.2374, -4.5873, 4.9497, 0, -4.9497, 2.6788, 0, -6.4672, 2.4826, -1.2374, -5.9936, 4.5873, -1.2374, -4.5873, 2.4826, -1.2374, -5.9936, 3.7123, -1.75, -3.7123, 4.5873, -1.2374, -4.5873, 2.4826, -1.2374, -5.9936, 2.0091, -1.75, -4.8504, 3.7123, -1.75, -3.7123, 2.0091, -1.75, -4.8504, 2.8373, -1.2374, -2.8373, 3.7123, -1.75, -3.7123, 2.0091, -1.75, -4.8504, 1.5355, -1.2374, -3.7071, 2.8373, -1.2374, -2.8373, 1.5355, -1.2374, -3.7071, 2.4749, 0, -2.4749, 2.8373, -1.2374, -2.8373, 1.5355, -1.2374, -3.7071, 1.3394, 0, -3.2336, 2.4749, 0, -2.4749, 0, 0, -3.5, 1.5355, 1.2374, -3.7071, 1.3394, 0, -3.2336, 0, 0, -3.5, 0, 1.2374, -4.0126, 1.5355, 1.2374, -3.7071, 0, 1.2374, -4.0126, 2.0091, 1.75, -4.8504, 1.5355, 1.2374, -3.7071, 0, 1.2374, -4.0126, 0, 1.75, -5.25, 2.0091, 1.75, -4.8504, 0, 1.75, -5.25, 2.4826, 1.2374, -5.9936, 2.0091, 1.75, -4.8504, 0, 1.75, -5.25, 0, 1.2374, -6.4874, 2.4826, 1.2374, -5.9936, 0, 1.2374, -6.4874, 2.6788, 0, -6.4672, 2.4826, 1.2374, -5.9936, 0, 1.2374, -6.4874, 0, 0, -7, 2.6788, 0, -6.4672, 0, 0, -7, 2.4826, -1.2374, -5.9936, 2.6788, 0, -6.4672, 0, 0, -7, 0, -1.2374, -6.4874, 2.4826, -1.2374, -5.9936, 0, -1.2374, -6.4874, 2.0091, -1.75, -4.8504, 2.4826, -1.2374, -5.9936, 0, -1.2374, -6.4874, 0, -1.75, -5.25, 2.0091, -1.75, -4.8504, 0, -1.75, -5.25, 1.5355, -1.2374, -3.7071, 2.0091, -1.75, -4.8504, 0, -1.75, -5.25, 0, -1.2374, -4.0126, 1.5355, -1.2374, -3.7071, 0, -1.2374, -4.0126, 1.3394, 0, -3.2336, 1.5355, -1.2374, -3.7071, 0, -1.2374, -4.0126, 0, 0, -3.5, 1.3394, 0, -3.2336) -[sub_resource type="PrismMesh" id="PrismMesh_blya6"] +[sub_resource type="PrismMesh" id="PrismMesh_xglk4"] left_to_right = 0.0 size = Vector3(4, 2, 4) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_oax4w"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kamav"] albedo_color = Color(1, 0.666667, 0.176471, 1) -[sub_resource type="PrismMesh" id="PrismMesh_tj1wu"] +[sub_resource type="PrismMesh" id="PrismMesh_3jdtn"] left_to_right = 0.0 size = Vector3(4, 1, 4) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_xghv0"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ykfn8"] data = PackedVector3Array(-2, 1, 2, 2, -1, 2, -2, -1, 2, -2, 1, -2, -2, -1, -2, 2, -1, -2, -2, 1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, -2, 2, -1, 2, -2, 1, -2, -2, 1, 2, -2, -1, -2, -2, 1, 2, -2, -1, 2, -2, -1, -2, -2, -1, 2, 2, -1, 2, -2, -1, -2, 2, -1, 2, 2, -1, -2, -2, -1, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_b33qc"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_4aeas"] data = PackedVector3Array(-2, 0.5, 2, 2, -0.5, 2, -2, -0.5, 2, -2, 0.5, -2, -2, -0.5, -2, 2, -0.5, -2, -2, 0.5, 2, -2, 0.5, -2, 2, -0.5, 2, -2, 0.5, -2, 2, -0.5, -2, 2, -0.5, 2, -2, 0.5, -2, -2, 0.5, 2, -2, -0.5, -2, -2, 0.5, 2, -2, -0.5, 2, -2, -0.5, -2, -2, -0.5, 2, 2, -0.5, 2, -2, -0.5, -2, 2, -0.5, 2, 2, -0.5, -2, -2, -0.5, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_2ho56"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_e2cnd"] data = PackedVector3Array(-2, 1, 2, 2, -1, 2, -2, -1, 2, -2, 1, -2, -2, -1, -2, 2, -1, -2, -2, 1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, -2, 2, -1, 2, -2, 1, -2, -2, 1, 2, -2, -1, -2, -2, 1, 2, -2, -1, 2, -2, -1, -2, -2, -1, 2, 2, -1, 2, -2, -1, -2, 2, -1, 2, 2, -1, -2, -2, -1, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_b100k"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_8ool4"] data = PackedVector3Array(-2, 0.5, 2, 2, -0.5, 2, -2, -0.5, 2, -2, 0.5, -2, -2, -0.5, -2, 2, -0.5, -2, -2, 0.5, 2, -2, 0.5, -2, 2, -0.5, 2, -2, 0.5, -2, 2, -0.5, -2, 2, -0.5, 2, -2, 0.5, -2, -2, 0.5, 2, -2, -0.5, -2, -2, 0.5, 2, -2, -0.5, 2, -2, -0.5, -2, -2, -0.5, 2, 2, -0.5, 2, -2, -0.5, -2, 2, -0.5, 2, 2, -0.5, -2, -2, -0.5, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_0ayl4"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_ru3pl"] data = PackedVector3Array(-2, 1, 2, 2, -1, 2, -2, -1, 2, -2, 1, -2, -2, -1, -2, 2, -1, -2, -2, 1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, -2, 2, -1, 2, -2, 1, -2, -2, 1, 2, -2, -1, -2, -2, 1, 2, -2, -1, 2, -2, -1, -2, -2, -1, 2, 2, -1, 2, -2, -1, -2, 2, -1, 2, 2, -1, -2, -2, -1, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_15i73"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_stwys"] data = PackedVector3Array(-2, 0.5, 2, 2, -0.5, 2, -2, -0.5, 2, -2, 0.5, -2, -2, -0.5, -2, 2, -0.5, -2, -2, 0.5, 2, -2, 0.5, -2, 2, -0.5, 2, -2, 0.5, -2, 2, -0.5, -2, 2, -0.5, 2, -2, 0.5, -2, -2, 0.5, 2, -2, -0.5, -2, -2, 0.5, 2, -2, -0.5, 2, -2, -0.5, -2, -2, -0.5, 2, 2, -0.5, 2, -2, -0.5, -2, 2, -0.5, 2, 2, -0.5, -2, -2, -0.5, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_vadk1"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_04800"] data = PackedVector3Array(-2, 1, 2, 2, -1, 2, -2, -1, 2, -2, 1, -2, -2, -1, -2, 2, -1, -2, -2, 1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, -2, 2, -1, 2, -2, 1, -2, -2, 1, 2, -2, -1, -2, -2, 1, 2, -2, -1, 2, -2, -1, -2, -2, -1, 2, 2, -1, 2, -2, -1, -2, 2, -1, 2, 2, -1, -2, -2, -1, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_fd8rp"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_248tl"] data = PackedVector3Array(-2, 0.5, 2, 2, -0.5, 2, -2, -0.5, 2, -2, 0.5, -2, -2, -0.5, -2, 2, -0.5, -2, -2, 0.5, 2, -2, 0.5, -2, 2, -0.5, 2, -2, 0.5, -2, 2, -0.5, -2, 2, -0.5, 2, -2, 0.5, -2, -2, 0.5, 2, -2, -0.5, -2, -2, 0.5, 2, -2, -0.5, 2, -2, -0.5, -2, -2, -0.5, 2, 2, -0.5, 2, -2, -0.5, -2, 2, -0.5, 2, 2, -0.5, -2, -2, -0.5, -2) -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_0v26t"] +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_nhcrh"] data = PackedVector3Array(-2, 1, 2, 2, -1, 2, -2, -1, 2, -2, 1, -2, -2, -1, -2, 2, -1, -2, -2, 1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, -2, 2, -1, 2, -2, 1, -2, -2, 1, 2, -2, -1, -2, -2, 1, 2, -2, -1, 2, -2, -1, -2, -2, -1, 2, 2, -1, 2, -2, -1, -2, 2, -1, 2, 2, -1, -2, -2, -1, -2) [node name="TownScene" type="Node3D"] @@ -120,7 +120,7 @@ grow_vertical = 0 focus_mode = 0 shortcut_in_tooltip = false action_mode = 0 -shortcut = SubResource("Shortcut_r8gsr") +shortcut = SubResource("Shortcut_msvqx") shortcut_feedback = false text = "Speed: ???" script = ExtResource("2") @@ -147,46 +147,46 @@ directional_shadow_max_distance = 80.0 [node name="Ground" type="MeshInstance3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29, -5.86, 2064.6) cast_shadow = 0 -mesh = SubResource("BoxMesh_ds7l2") -surface_material_override/0 = SubResource("StandardMaterial3D_w8yqu") +mesh = SubResource("BoxMesh_x3c0g") +surface_material_override/0 = SubResource("StandardMaterial3D_0ud3l") [node name="StaticBody3D" type="StaticBody3D" parent="Ground"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Ground/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_mi6nf") +shape = SubResource("ConcavePolygonShape3D_gearx") [node name="Ground2" type="MeshInstance3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29, -5.86, -2125.13) cast_shadow = 0 -mesh = SubResource("BoxMesh_ds7l2") -surface_material_override/0 = SubResource("StandardMaterial3D_w8yqu") +mesh = SubResource("BoxMesh_x3c0g") +surface_material_override/0 = SubResource("StandardMaterial3D_0ud3l") [node name="StaticBody3D" type="StaticBody3D" parent="Ground2"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Ground2/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_uw685") +shape = SubResource("ConcavePolygonShape3D_g7q2f") [node name="Ground3" type="MeshInstance3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1082.19, -5.86, -30.267) cast_shadow = 0 -mesh = SubResource("BoxMesh_47rhw") -surface_material_override/0 = SubResource("StandardMaterial3D_jp38k") +mesh = SubResource("BoxMesh_n528d") +surface_material_override/0 = SubResource("StandardMaterial3D_aijyr") [node name="StaticBody3D" type="StaticBody3D" parent="Ground3"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Ground3/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_va4bq") +shape = SubResource("ConcavePolygonShape3D_mb5rx") [node name="Ground4" type="MeshInstance3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1027.31, -5.86, -30.248) cast_shadow = 0 -mesh = SubResource("BoxMesh_47rhw") -surface_material_override/0 = SubResource("StandardMaterial3D_jp38k") +mesh = SubResource("BoxMesh_n528d") +surface_material_override/0 = SubResource("StandardMaterial3D_aijyr") [node name="StaticBody3D" type="StaticBody3D" parent="Ground4"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Ground4/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_ibj2n") +shape = SubResource("ConcavePolygonShape3D_3wmyg") [node name="Racetrack" type="CSGPolygon3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.225899, 0) @@ -207,124 +207,124 @@ smooth_faces = true material = ExtResource("5_83ty7") [node name="Path3D" type="Path3D" parent="Racetrack"] -curve = SubResource("Curve3D_qvxke") +curve = SubResource("Curve3D_6vskq") [node name="HugeTire" type="MeshInstance3D" parent="Racetrack"] transform = Transform3D(-4.29291e-08, 0.982104, 0.188341, -1, -4.37114e-08, -6.16922e-16, 8.23266e-09, -0.188341, 0.982104, -43, -2.7741, -101.158) -mesh = SubResource("TorusMesh_sk6m6") +mesh = SubResource("TorusMesh_jqadq") skeleton = NodePath("../..") -surface_material_override/0 = SubResource("StandardMaterial3D_rbi6m") +surface_material_override/0 = SubResource("StandardMaterial3D_5qgna") metadata/_edit_group_ = true [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/HugeTire"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/HugeTire/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_gf7tp") +shape = SubResource("ConcavePolygonShape3D_smisc") [node name="Ramp" type="MeshInstance3D" parent="Racetrack"] transform = Transform3D(0.984808, 0, 0.173648, 0, 1, 0, -0.173648, 0, 0.984808, -36, -4.13, -106.8) -mesh = SubResource("PrismMesh_blya6") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +mesh = SubResource("PrismMesh_xglk4") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") metadata/_edit_group_ = true [node name="RampStart" type="MeshInstance3D" parent="Racetrack/Ramp"] transform = Transform3D(1, 0, 1.49012e-08, 0, 1, 0, -1.49012e-08, 0, 1, 1, -0.5, 7.62939e-06) -mesh = SubResource("PrismMesh_tj1wu") +mesh = SubResource("PrismMesh_3jdtn") skeleton = NodePath("../..") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_xghv0") +shape = SubResource("ConcavePolygonShape3D_ykfn8") [node name="Ramp2" type="MeshInstance3D" parent="Racetrack"] transform = Transform3D(0.984808, 0, 0.173648, 0, 1, 0, -0.173648, 0, 0.984808, -34.366, -4.13, -98.138) -mesh = SubResource("PrismMesh_blya6") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +mesh = SubResource("PrismMesh_xglk4") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") metadata/_edit_group_ = true [node name="RampStart" type="MeshInstance3D" parent="Racetrack/Ramp2"] transform = Transform3D(1, 0, 1.49012e-08, 0, 1, 0, -1.49012e-08, 0, 1, 1, -0.5, 7.62939e-06) -mesh = SubResource("PrismMesh_tj1wu") +mesh = SubResource("PrismMesh_3jdtn") skeleton = NodePath("../..") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp2/RampStart"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp2/RampStart/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_b33qc") +shape = SubResource("ConcavePolygonShape3D_4aeas") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp2"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp2/StaticBody3D"] transform = Transform3D(1, 0, 1.49012e-08, 0, 1, 0, -1.49012e-08, 0, 1, 0, 0, 0) -shape = SubResource("ConcavePolygonShape3D_2ho56") +shape = SubResource("ConcavePolygonShape3D_e2cnd") [node name="Ramp3" type="MeshInstance3D" parent="Racetrack"] transform = Transform3D(0.984808, 0, 0.173648, 0, 1, 0, -0.173648, 0, 0.984808, -80.4018, -4.13, -101.536) -mesh = SubResource("PrismMesh_blya6") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +mesh = SubResource("PrismMesh_xglk4") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") metadata/_edit_group_ = true [node name="RampStart" type="MeshInstance3D" parent="Racetrack/Ramp3"] transform = Transform3D(1, 0, 1.49012e-08, 0, 1, 0, -1.49012e-08, 0, 1, 1, -0.5, 7.62939e-06) -mesh = SubResource("PrismMesh_tj1wu") +mesh = SubResource("PrismMesh_3jdtn") skeleton = NodePath("../..") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp3/RampStart"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp3/RampStart/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_b100k") +shape = SubResource("ConcavePolygonShape3D_8ool4") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp3"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp3/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_0ayl4") +shape = SubResource("ConcavePolygonShape3D_ru3pl") [node name="Ramp4" type="MeshInstance3D" parent="Racetrack"] transform = Transform3D(-0.984808, 0, -0.173648, 0, 1, 0, 0.173648, 0, -0.984808, -62.2203, -4.13, -104.798) -mesh = SubResource("PrismMesh_blya6") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +mesh = SubResource("PrismMesh_xglk4") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") metadata/_edit_group_ = true [node name="RampStart" type="MeshInstance3D" parent="Racetrack/Ramp4"] transform = Transform3D(1, 0, 1.49012e-08, 0, 1, 0, -1.49012e-08, 0, 1, 1, -0.5, 7.62939e-06) -mesh = SubResource("PrismMesh_tj1wu") +mesh = SubResource("PrismMesh_3jdtn") skeleton = NodePath("../..") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp4/RampStart"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp4/RampStart/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_15i73") +shape = SubResource("ConcavePolygonShape3D_stwys") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp4"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp4/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_vadk1") +shape = SubResource("ConcavePolygonShape3D_04800") [node name="Ramp5" type="MeshInstance3D" parent="Racetrack"] transform = Transform3D(-0.984808, 0, -0.173648, 0, 1, 0, 0.173648, 0, -0.984808, -89.0271, -4.13, -100.015) -mesh = SubResource("PrismMesh_blya6") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +mesh = SubResource("PrismMesh_xglk4") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") metadata/_edit_group_ = true [node name="RampStart" type="MeshInstance3D" parent="Racetrack/Ramp5"] transform = Transform3D(1, 0, 1.49012e-08, 0, 1, 0, -1.49012e-08, 0, 1, 1, -0.5, 7.62939e-06) -mesh = SubResource("PrismMesh_tj1wu") +mesh = SubResource("PrismMesh_3jdtn") skeleton = NodePath("../..") -surface_material_override/0 = SubResource("StandardMaterial3D_oax4w") +surface_material_override/0 = SubResource("StandardMaterial3D_kamav") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp5/RampStart"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp5/RampStart/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_fd8rp") +shape = SubResource("ConcavePolygonShape3D_248tl") [node name="StaticBody3D" type="StaticBody3D" parent="Racetrack/Ramp5"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Racetrack/Ramp5/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_0v26t") +shape = SubResource("ConcavePolygonShape3D_nhcrh") [connection signal="pressed" from="Spedometer" to="Spedometer" method="_on_spedometer_pressed"] diff --git a/3d/truck_town/vehicles/car_base.tscn b/3d/truck_town/vehicles/car_base.tscn index 82e5b891..6830d4a9 100644 --- a/3d/truck_town/vehicles/car_base.tscn +++ b/3d/truck_town/vehicles/car_base.tscn @@ -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) diff --git a/3d/truck_town/vehicles/follow_camera.gd b/3d/truck_town/vehicles/follow_camera.gd index d8335664..c87e1887 100644 --- a/3d/truck_town/vehicles/follow_camera.gd +++ b/3d/truck_town/vehicles/follow_camera.gd @@ -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) diff --git a/3d/truck_town/vehicles/tow_truck.tscn b/3d/truck_town/vehicles/tow_truck.tscn index f198221d..100ae74e 100644 --- a/3d/truck_town/vehicles/tow_truck.tscn +++ b/3d/truck_town/vehicles/tow_truck.tscn @@ -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) diff --git a/3d/truck_town/vehicles/trailer_truck.tscn b/3d/truck_town/vehicles/trailer_truck.tscn index 2d35094b..f64a48ce 100644 --- a/3d/truck_town/vehicles/trailer_truck.tscn +++ b/3d/truck_town/vehicles/trailer_truck.tscn @@ -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)