From 48679e842e85877370c948974b66aa701c0e3bb7 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Wed, 14 Sep 2022 23:43:49 -0400 Subject: Reorganize the Main scene and fix the collision layers/masks --- Main.tscn | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) (limited to 'Main.tscn') diff --git a/Main.tscn b/Main.tscn index b31542a..919a0bc 100644 --- a/Main.tscn +++ b/Main.tscn @@ -44,12 +44,12 @@ directional_shadow_blend_splits = true [node name="fps_controller" parent="." instance=ExtResource( 1 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 17, 44 ) - -[node name="Water" parent="." instance=ExtResource( 3 )] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 ) +collision_mask = 4 [node name="Ground" type="StaticBody" parent="."] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -10, 0 ) +collision_layer = 4 +collision_mask = 0 [node name="CollisionShape" type="CollisionShape" parent="Ground"] shape = SubResource( 19 ) @@ -58,16 +58,30 @@ shape = SubResource( 19 ) mesh = SubResource( 20 ) material/0 = SubResource( 21 ) -[node name="MeshInstance" type="MeshInstance" parent="."] -visible = false -mesh = SubResource( 15 ) +[node name="Water" parent="." instance=ExtResource( 3 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 ) + +[node name="World" type="RigidBody" parent="."] +collision_layer = 0 +collision_mask = 0 +axis_lock_linear_y = true +axis_lock_angular_x = true +axis_lock_angular_y = true +axis_lock_angular_z = true +linear_damp = 0.5 +script = ExtResource( 5 ) -[node name="MultiMeshInstance" type="MultiMeshInstance" parent="."] +[node name="MultiMeshInstance" type="MultiMeshInstance" parent="World"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3.18141, 0 ) +visible = false multimesh = SubResource( 16 ) +[node name="CollisionShape" type="CollisionShape" parent="World"] +shape = SubResource( 23 ) + [node name="ShipRigidBody" type="RigidBody" parent="."] -collision_layer = 0 -collision_mask = 0 +collision_layer = 2 +collision_mask = 8 axis_lock_linear_x = true axis_lock_linear_z = true linear_damp = 2.0 @@ -109,31 +123,15 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.77011, -3.30323, 33.2966 ) [node name="Float10" parent="ShipRigidBody" instance=ExtResource( 4 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.77011, -3.30323, 16.0946 ) - [node name="Float11" parent="ShipRigidBody" instance=ExtResource( 4 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.77011, -3.30323, 0 ) - [node name="Float12" parent="ShipRigidBody" instance=ExtResource( 4 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.77011, -3.30323, -14.1012 ) [node name="Float13" parent="ShipRigidBody" instance=ExtResource( 4 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.77011, -3.30323, -29.0883 ) - [node name="Float14" parent="ShipRigidBody" instance=ExtResource( 4 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 9.77011, -3.30323, -49.022 ) - [node name="crates" type="Spatial" parent="."] - -[node name="World" type="RigidBody" parent="."] -collision_layer = 0 -collision_mask = 0 -axis_lock_linear_y = true -axis_lock_angular_x = true -axis_lock_angular_y = true -axis_lock_angular_z = true -linear_damp = 0.5 -script = ExtResource( 5 ) - -[node name="CollisionShape" type="CollisionShape" parent="World"] shape = SubResource( 23 ) [node name="crate" parent="crates" instance=ExtResource( 5 )] -- cgit v1.2.3