diff --git a/asset_dev/props/arrow/arrow.blend b/asset_dev/props/arrow/arrow.blend new file mode 100644 index 0000000..5ba4832 Binary files /dev/null and b/asset_dev/props/arrow/arrow.blend differ diff --git a/asset_dev/props/arrow/arrow.blend1 b/asset_dev/props/arrow/arrow.blend1 new file mode 100644 index 0000000..83de7b2 Binary files /dev/null and b/asset_dev/props/arrow/arrow.blend1 differ diff --git a/assets/props/arrow/arrow.mtl b/assets/props/arrow/arrow.mtl new file mode 100644 index 0000000..caf4802 --- /dev/null +++ b/assets/props/arrow/arrow.mtl @@ -0,0 +1,2 @@ +# Blender 4.3.2 MTL File: 'arrow.blend' +# www.blender.org diff --git a/assets/props/arrow/arrow.obj b/assets/props/arrow/arrow.obj new file mode 100644 index 0000000..f9cf248 --- /dev/null +++ b/assets/props/arrow/arrow.obj @@ -0,0 +1,218 @@ +# Blender 4.3.2 +# www.blender.org +mtllib arrow.mtl +o Cylinder +v 0.000000 -0.010000 0.000000 +v 0.000000 -0.000000 -1.000000 +v 0.003827 -0.009239 0.000000 +v 0.007071 -0.007071 0.000000 +v 0.009239 -0.003827 0.000000 +v 0.010000 0.000000 -0.000000 +v 0.009239 0.003827 -0.000000 +v 0.007071 0.007071 -0.000000 +v 0.003827 0.009239 -0.000000 +v 0.000000 0.010000 -0.000000 +v -0.003827 0.009239 -0.000000 +v -0.007071 0.007071 -0.000000 +v -0.009239 0.003827 -0.000000 +v -0.010000 -0.000000 0.000000 +v -0.009239 -0.003827 0.000000 +v -0.007071 -0.007071 0.000000 +v -0.003827 -0.009239 0.000000 +v 0.000000 -0.010000 -0.900000 +v 0.003827 -0.009239 -0.900000 +v 0.007071 -0.007071 -0.900000 +v 0.009239 -0.003827 -0.900000 +v 0.010000 -0.000000 -0.900000 +v 0.009239 0.003827 -0.900000 +v 0.007071 0.007071 -0.900000 +v 0.003827 0.009239 -0.900000 +v 0.000000 0.010000 -0.900000 +v -0.003827 0.009239 -0.900000 +v -0.007071 0.007071 -0.900000 +v -0.009239 0.003827 -0.900000 +v -0.010000 -0.000000 -0.900000 +v -0.009239 -0.003827 -0.900000 +v -0.007071 -0.007071 -0.900000 +v -0.003827 -0.009239 -0.900000 +v 0.000000 -0.022500 -0.900000 +v 0.008610 -0.020788 -0.900000 +v 0.015910 -0.015910 -0.900000 +v 0.020787 -0.008611 -0.900000 +v 0.022500 -0.000000 -0.900000 +v 0.020787 0.008610 -0.900000 +v 0.015910 0.015910 -0.900000 +v 0.008610 0.020787 -0.900000 +v 0.000000 0.022500 -0.900000 +v -0.008610 0.020787 -0.900000 +v -0.015910 0.015910 -0.900000 +v -0.020787 0.008610 -0.900000 +v -0.022500 -0.000000 -0.900000 +v -0.020787 -0.008611 -0.900000 +v -0.015910 -0.015910 -0.900000 +v -0.008610 -0.020788 -0.900000 +vn -0.0000 -0.7462 0.6657 +vn -0.0000 -0.0000 -1.0000 +vn 0.2856 -0.6894 0.6657 +vn 0.5276 -0.5276 0.6657 +vn 0.6894 -0.2856 0.6657 +vn 0.7462 -0.0000 0.6657 +vn 0.6894 0.2856 0.6657 +vn 0.5276 0.5276 0.6657 +vn 0.2856 0.6894 0.6657 +vn -0.0000 0.7462 0.6657 +vn -0.2856 0.6894 0.6657 +vn -0.5276 0.5276 0.6657 +vn -0.6894 0.2856 0.6657 +vn -0.7462 -0.0000 0.6657 +vn -0.6894 -0.2856 0.6657 +vn -0.5276 -0.5276 0.6657 +vn -0.2856 -0.6894 0.6657 +vn -0.0000 -0.6571 0.7538 +vn 0.2515 -0.6071 0.7538 +vn 0.4647 -0.4647 0.7538 +vn 0.6071 -0.2515 0.7538 +vn 0.6571 -0.0000 0.7538 +vn 0.6071 0.2515 0.7538 +vn 0.4647 0.4647 0.7538 +vn 0.2515 0.6071 0.7538 +vn -0.0000 0.6571 0.7538 +vn -0.2515 0.6071 0.7538 +vn -0.4647 0.4647 0.7538 +vn -0.6071 0.2515 0.7538 +vn -0.6571 -0.0000 0.7538 +vn -0.6071 -0.2515 0.7538 +vn -0.4647 -0.4647 0.7538 +vn -0.2515 -0.6071 0.7538 +vn -0.0000 -0.8138 0.5812 +vn 0.3114 -0.7518 0.5812 +vn 0.5754 -0.5754 0.5812 +vn 0.7518 -0.3114 0.5812 +vn 0.8138 -0.0000 0.5812 +vn 0.7518 0.3114 0.5812 +vn 0.5754 0.5754 0.5812 +vn 0.3114 0.7518 0.5812 +vn -0.0000 0.8138 0.5812 +vn -0.3114 0.7518 0.5812 +vn -0.5754 0.5754 0.5812 +vn -0.7518 0.3114 0.5812 +vn -0.8138 -0.0000 0.5812 +vn -0.7518 -0.3114 0.5812 +vn -0.5754 -0.5754 0.5812 +vn -0.3114 -0.7518 0.5812 +vt 0.187500 0.875000 +vt 0.250000 0.875000 +vt 0.125000 0.875000 +vt 0.937500 0.875000 +vt 1.000000 0.875000 +vt 0.062500 0.875000 +vt 0.875000 0.875000 +vt 0.000000 0.875000 +vt 0.812500 0.875000 +vt 0.750000 0.875000 +vt 0.687500 0.875000 +vt 0.750000 0.490000 +vt 0.841844 0.471731 +vt 0.919706 0.419706 +vt 0.971731 0.341844 +vt 0.990000 0.250000 +vt 0.971731 0.158156 +vt 0.919706 0.080294 +vt 0.841844 0.028269 +vt 0.750000 0.010000 +vt 0.658156 0.028269 +vt 0.580294 0.080294 +vt 0.528269 0.158156 +vt 0.510000 0.250000 +vt 0.528269 0.341844 +vt 0.580294 0.419706 +vt 0.658156 0.471731 +vt 0.062500 0.500000 +vt 0.000000 0.500000 +vt 0.125000 0.500000 +vt 0.187500 0.500000 +vt 0.250000 0.500000 +vt 0.312500 0.500000 +vt 0.312500 0.875000 +vt 0.375000 0.500000 +vt 0.375000 0.875000 +vt 0.437500 0.500000 +vt 0.437500 0.875000 +vt 0.500000 0.500000 +vt 0.500000 0.875000 +vt 0.562500 0.500000 +vt 0.562500 0.875000 +vt 0.625000 0.500000 +vt 0.625000 0.875000 +vt 0.687500 0.500000 +vt 0.750000 0.500000 +vt 0.812500 0.500000 +vt 0.875000 0.500000 +vt 0.937500 0.500000 +vt 1.000000 0.500000 +vt 0.937500 1.000000 +vt 0.875000 1.000000 +vt 0.812500 1.000000 +vt 0.750000 1.000000 +vt 0.687500 1.000000 +vt 0.625000 1.000000 +vt 0.562500 1.000000 +vt 0.500000 1.000000 +vt 0.437500 1.000000 +vt 0.375000 1.000000 +vt 0.312500 1.000000 +vt 0.250000 1.000000 +vt 0.187500 1.000000 +vt 0.125000 1.000000 +vt 0.062500 1.000000 +vt 0.000000 1.000000 +s 1 +f 31/1/31 30/2/30 46/2/46 47/1/47 +f 32/3/32 31/1/31 47/1/47 48/3/48 +f 19/4/19 18/5/18 34/5/34 35/4/35 +f 33/6/33 32/3/32 48/3/48 49/6/49 +f 20/7/20 19/4/19 35/4/35 36/7/36 +f 18/8/18 33/6/33 49/6/49 34/8/34 +f 21/9/21 20/7/20 36/7/36 37/9/37 +f 22/10/22 21/9/21 37/9/37 38/10/38 +f 23/11/23 22/10/22 38/10/38 39/11/39 +f 1/12/1 3/13/3 4/14/4 5/15/5 6/16/6 7/17/7 8/18/8 9/19/9 10/20/10 11/21/11 12/22/12 13/23/13 14/24/14 15/25/15 16/26/16 17/27/17 +f 17/28/17 33/6/33 18/8/18 1/29/1 +f 16/30/16 32/3/32 33/6/33 17/28/17 +f 15/31/15 31/1/31 32/3/32 16/30/16 +f 14/32/14 30/2/30 31/1/31 15/31/15 +f 13/33/13 29/34/29 30/2/30 14/32/14 +f 12/35/12 28/36/28 29/34/29 13/33/13 +f 11/37/11 27/38/27 28/36/28 12/35/12 +f 10/39/10 26/40/26 27/38/27 11/37/11 +f 9/41/9 25/42/25 26/40/26 10/39/10 +f 8/43/8 24/44/24 25/42/25 9/41/9 +f 7/45/7 23/11/23 24/44/24 8/43/8 +f 6/46/6 22/10/22 23/11/23 7/45/7 +f 5/47/5 21/9/21 22/10/22 6/46/6 +f 4/48/4 20/7/20 21/9/21 5/47/5 +f 3/49/3 19/4/19 20/7/20 4/48/4 +f 1/50/1 18/5/18 19/4/19 3/49/3 +f 34/5/34 2/51/2 35/4/35 +f 35/4/35 2/52/2 36/7/36 +f 36/7/36 2/53/2 37/9/37 +f 37/9/37 2/54/2 38/10/38 +f 38/10/38 2/55/2 39/11/39 +f 39/11/39 2/56/2 40/44/40 +f 40/44/40 2/57/2 41/42/41 +f 41/42/41 2/58/2 42/40/42 +f 42/40/42 2/59/2 43/38/43 +f 43/38/43 2/60/2 44/36/44 +f 44/36/44 2/61/2 45/34/45 +f 45/34/45 2/62/2 46/2/46 +f 46/2/46 2/63/2 47/1/47 +f 47/1/47 2/64/2 48/3/48 +f 48/3/48 2/65/2 49/6/49 +f 49/6/49 2/66/2 34/8/34 +f 30/2/30 29/34/29 45/34/45 46/2/46 +f 29/34/29 28/36/28 44/36/44 45/34/45 +f 28/36/28 27/38/27 43/38/43 44/36/44 +f 27/38/27 26/40/26 42/40/42 43/38/43 +f 26/40/26 25/42/25 41/42/41 42/40/42 +f 25/42/25 24/44/24 40/44/40 41/42/41 +f 24/44/24 23/11/23 39/11/39 40/44/40 diff --git a/assets/props/arrow/arrow.obj.import b/assets/props/arrow/arrow.obj.import new file mode 100644 index 0000000..19190bb --- /dev/null +++ b/assets/props/arrow/arrow.obj.import @@ -0,0 +1,25 @@ +[remap] + +importer="wavefront_obj" +importer_version=1 +type="Mesh" +uid="uid://bgrutdse8bl8b" +path="res://.godot/imported/arrow.obj-83d150d06243a45f3fe0fa868b4b6c85.mesh" + +[deps] + +files=["res://.godot/imported/arrow.obj-83d150d06243a45f3fe0fa868b4b6c85.mesh"] + +source_file="res://assets/props/arrow/arrow.obj" +dest_files=["res://.godot/imported/arrow.obj-83d150d06243a45f3fe0fa868b4b6c85.mesh", "res://.godot/imported/arrow.obj-83d150d06243a45f3fe0fa868b4b6c85.mesh"] + +[params] + +generate_tangents=true +generate_lods=true +generate_shadow_mesh=true +generate_lightmap_uv2=false +generate_lightmap_uv2_texel_size=0.2 +scale_mesh=Vector3(1, 1, 1) +offset_mesh=Vector3(0, 0, 0) +force_disable_mesh_compression=false diff --git a/levels/ghost_ship/ghost_ship_level.tscn b/levels/ghost_ship/ghost_ship_level.tscn index 1773fde..e6542b1 100644 --- a/levels/ghost_ship/ghost_ship_level.tscn +++ b/levels/ghost_ship/ghost_ship_level.tscn @@ -2066,7 +2066,7 @@ transform = Transform3D(0.965926, 0, 0.258819, 0, 1, 0, -0.258819, 0, 0.965926, transform = Transform3D(0.965925, 0, 0.258819, 0, 1, 0, -0.258819, 0, 0.965925, 2.02843, -0.4, -0.543522) [node name="GunkRelay4" parent="MessHall/Traps/Trap1" instance=ExtResource("39_6glsq")] -transform = Transform3D(0.965925, 0, 0.258819, 0, 1, 0, -0.258819, 0, 0.965925, 2.97541, -0.4, -0.486683) +transform = Transform3D(0.965925, 0, 0.258819, 0, 1, 0, -0.258819, 0, 0.965925, 2.9754, -0.4, -0.486691) [node name="GunkRelay5" parent="MessHall/Traps/Trap1" instance=ExtResource("39_6glsq")] transform = Transform3D(0.965925, 0, 0.258819, 0, 1, 0, -0.258819, 0, 0.965925, 3.379, -0.1, -1.3) diff --git a/levels/mechanic_test/mechanic_test.tscn b/levels/mechanic_test/mechanic_test.tscn index b153eb2..0842ff1 100644 --- a/levels/mechanic_test/mechanic_test.tscn +++ b/levels/mechanic_test/mechanic_test.tscn @@ -133,7 +133,7 @@ data = PackedVector3Array(-1.5, 0, -6, -1.5, 0, 6, -1.5, 3, -6, -1.5, 3, -6, -1. script = ExtResource("1_bg05n") [node name="Player" parent="." instance=ExtResource("1_goufh")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.65, 0) [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] transform = Transform3D(0.866025, -0.156955, -0.474726, 0.5, 0.271854, 0.82225, 0, -0.949453, 0.31391, 0, 0, 0) diff --git a/levels/mechanic_test/signal_test.tscn b/levels/mechanic_test/signal_test.tscn index a4ba4fd..d20e5d8 100644 --- a/levels/mechanic_test/signal_test.tscn +++ b/levels/mechanic_test/signal_test.tscn @@ -74,7 +74,7 @@ seamless = true seamless_blend_skirt = 0.5 noise = ExtResource("3_e8utx") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_awnx0"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_e8utx"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("2_tfbib") @@ -142,7 +142,7 @@ _surfaces = [{ blend_shape_mode = 0 shadow_mesh = SubResource("ArrayMesh_tfbib") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_tfbib"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_r07l4"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("2_tfbib") @@ -196,7 +196,7 @@ _surfaces = [{ blend_shape_mode = 0 shadow_mesh = SubResource("ArrayMesh_r07l4") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_e8utx"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_67o2j"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("2_tfbib") @@ -228,7 +228,7 @@ skeleton = NodePath("GunkBody") [node name="GunkBody" parent="TriggerNetWall" instance=ExtResource("1_3u410")] mask_dim = 64 -source_gunk_material = SubResource("ShaderMaterial_awnx0") +source_gunk_material = SubResource("ShaderMaterial_e8utx") [node name="CollisionShape3D" type="CollisionShape3D" parent="TriggerNetWall/GunkBody"] shape = SubResource("ConcavePolygonShape3D_x2vho") @@ -263,7 +263,7 @@ skeleton = NodePath("GunkBody") [node name="GunkBody" parent="PulseNetWall" instance=ExtResource("1_3u410")] mask_dim = 64 -source_gunk_material = SubResource("ShaderMaterial_tfbib") +source_gunk_material = SubResource("ShaderMaterial_r07l4") [node name="CollisionShape3D" type="CollisionShape3D" parent="PulseNetWall/GunkBody"] shape = SubResource("ConcavePolygonShape3D_x2vho") @@ -300,7 +300,7 @@ mesh = SubResource("ArrayMesh_67o2j") [node name="GunkBody" parent="ListenerWall" instance=ExtResource("1_3u410")] mask_dim = 64 -source_gunk_material = SubResource("ShaderMaterial_e8utx") +source_gunk_material = SubResource("ShaderMaterial_67o2j") [node name="CollisionShape3D" type="CollisionShape3D" parent="ListenerWall/GunkBody"] shape = SubResource("ConcavePolygonShape3D_x2vho") diff --git a/levels/sandbox/sandbox.tscn b/levels/sandbox/sandbox.tscn index d97fc51..44456b4 100644 --- a/levels/sandbox/sandbox.tscn +++ b/levels/sandbox/sandbox.tscn @@ -73,7 +73,7 @@ seamless = true seamless_blend_skirt = 0.5 noise = ExtResource("6_l64ek") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_hrvvi"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sh2xs"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -151,7 +151,7 @@ seamless = true seamless_blend_skirt = 0.5 noise = ExtResource("6_l64ek") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_2218n"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_tpfln"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -211,7 +211,7 @@ _surfaces = [{ blend_shape_mode = 0 shadow_mesh = SubResource("ArrayMesh_i3ihq") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_fk1xc"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2218n"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -273,7 +273,7 @@ _surfaces = [{ blend_shape_mode = 0 shadow_mesh = SubResource("ArrayMesh_jllhp") -[sub_resource type="ShaderMaterial" id="ShaderMaterial_6fwow"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_j0yby"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -299,7 +299,7 @@ shader_parameter/inflation_pixellation = 10.0 [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_6ood3"] data = PackedVector3Array(-0.0001, 6, -4, -0.0001, -6, -4, 0.7803, 6, -3.9232, 0.7803, 6, -3.9232, -0.0001, -6, -4, 0.7803, -6, -3.9232, 0.7803, 6, -3.9232, 0.7803, -6, -3.9232, 1.5307, 6, -3.6956, 1.5307, 6, -3.6956, 0.7803, -6, -3.9232, 1.5307, -6, -3.6956, 1.5307, 6, -3.6956, 1.5307, -6, -3.6956, 2.2223, 6, -3.3259, 2.2223, 6, -3.3259, 1.5307, -6, -3.6956, 2.2223, -6, -3.3259, 2.2223, 6, -3.3259, 2.2223, -6, -3.3259, 2.8284, 6, -2.8285, 2.8284, 6, -2.8285, 2.2223, -6, -3.3259, 2.8284, -6, -2.8285, 2.8284, 6, -2.8285, 2.8284, -6, -2.8285, 3.3258, 6, -2.2224, 3.3258, 6, -2.2224, 2.8284, -6, -2.8285, 3.3258, -6, -2.2224, 3.3258, 6, -2.2224, 3.3258, -6, -2.2224, 3.6954, 6, -1.5308, 3.6954, 6, -1.5308, 3.3258, -6, -2.2224, 3.6954, -6, -1.5308, 3.6954, 6, -1.5308, 3.6954, -6, -1.5308, 3.9231, 6, -0.7805, 3.9231, 6, -0.7805, 3.6954, -6, -1.5308, 3.9231, -6, -0.7805, 3.9231, 6, -0.7805, 3.9231, -6, -0.7805, 4, 6, -0.0001, 4, 6, -0.0001, 3.9231, -6, -0.7805, 4, -6, -0.0001, 4, 6, -0.0001, 4, -6, -0.0001, 3.9231, 6, 0.7803, 3.9231, 6, 0.7803, 4, -6, -0.0001, 3.9231, -6, 0.7803, 3.9231, 6, 0.7803, 3.9231, -6, 0.7803, 3.6954, 6, 1.5307, 3.6954, 6, 1.5307, 3.9231, -6, 0.7803, 3.6954, -6, 1.5307, 3.6954, 6, 1.5307, 3.6954, -6, 1.5307, 3.3258, 6, 2.2223, 3.3258, 6, 2.2223, 3.6954, -6, 1.5307, 3.3258, -6, 2.2223, 3.3258, 6, 2.2223, 3.3258, -6, 2.2223, 2.8284, 6, 2.8284, 2.8284, 6, 2.8284, 3.3258, -6, 2.2223, 2.8284, -6, 2.8284, 2.8284, 6, 2.8284, 2.8284, -6, 2.8284, 2.2223, 6, 3.3258, 2.2223, 6, 3.3258, 2.8284, -6, 2.8284, 2.2223, -6, 3.3258, 2.2223, 6, 3.3258, 2.2223, -6, 3.3258, 1.5307, 6, 3.6954, 1.5307, 6, 3.6954, 2.2223, -6, 3.3258, 1.5307, -6, 3.6954, 1.5307, 6, 3.6954, 1.5307, -6, 3.6954, 0.7803, 6, 3.9231, 0.7803, 6, 3.9231, 1.5307, -6, 3.6954, 0.7803, -6, 3.9231, 0.7803, 6, 3.9231, 0.7803, -6, 3.9231, -0.0001, 6, 4, -0.0001, 6, 4, 0.7803, -6, 3.9231, -0.0001, -6, 4, -0.0001, 6, 4, -0.0001, -6, 4, -0.7805, 6, 3.9231, -0.7805, 6, 3.9231, -0.0001, -6, 4, -0.7805, -6, 3.9231, -0.7805, 6, 3.9231, -0.7805, -6, 3.9231, -1.5308, 6, 3.6954, -1.5308, 6, 3.6954, -0.7805, -6, 3.9231, -1.5308, -6, 3.6954, -1.5308, 6, 3.6954, -1.5308, -6, 3.6954, -2.2224, 6, 3.3258, -2.2224, 6, 3.3258, -1.5308, -6, 3.6954, -2.2224, -6, 3.3258, -2.2224, 6, 3.3258, -2.2224, -6, 3.3258, -2.8285, 6, 2.8284, -2.8285, 6, 2.8284, -2.2224, -6, 3.3258, -2.8285, -6, 2.8284, -2.8285, 6, 2.8284, -2.8285, -6, 2.8284, -3.3259, 6, 2.2223, -3.3259, 6, 2.2223, -2.8285, -6, 2.8284, -3.3259, -6, 2.2223, -3.3259, 6, 2.2223, -3.3259, -6, 2.2223, -3.6956, 6, 1.5307, -3.6956, 6, 1.5307, -3.3259, -6, 2.2223, -3.6956, -6, 1.5307, -3.6956, 6, 1.5307, -3.6956, -6, 1.5307, -3.9232, 6, 0.7803, -3.9232, 6, 0.7803, -3.6956, -6, 1.5307, -3.9232, -6, 0.7803, -3.9232, 6, 0.7803, -3.9232, -6, 0.7803, -4, 6, -0.0001, -4, 6, -0.0001, -3.9232, -6, 0.7803, -4, -6, -0.0001, -4, 6, -0.0001, -4, -6, -0.0001, -3.9232, 6, -0.7805, -3.9232, 6, -0.7805, -4, -6, -0.0001, -3.9232, -6, -0.7805, -3.9232, 6, -0.7805, -3.9232, -6, -0.7805, -3.6956, 6, -1.5308, -3.6956, 6, -1.5308, -3.9232, -6, -0.7805, -3.6956, -6, -1.5308, -3.6956, 6, -1.5308, -3.6956, -6, -1.5308, -3.3259, 6, -2.2224, -3.3259, 6, -2.2224, -3.6956, -6, -1.5308, -3.3259, -6, -2.2224, -3.3259, 6, -2.2224, -3.3259, -6, -2.2224, -2.8285, 6, -2.8285, -2.8285, 6, -2.8285, -3.3259, -6, -2.2224, -2.8285, -6, -2.8285, -2.8285, 6, -2.8285, -2.8285, -6, -2.8285, -2.2224, 6, -3.3259, -2.2224, 6, -3.3259, -2.8285, -6, -2.8285, -2.2224, -6, -3.3259, -2.2224, 6, -3.3259, -2.2224, -6, -3.3259, -1.5308, 6, -3.6956, -1.5308, 6, -3.6956, -2.2224, -6, -3.3259, -1.5308, -6, -3.6956, -0.0001, 6, -4, 0.7803, 6, -3.9232, -0.7805, 6, -3.9232, -0.7805, 6, -3.9232, 0.7803, 6, -3.9232, -1.5308, 6, -3.6956, -1.5308, 6, -3.6956, 0.7803, 6, -3.9232, -2.2224, 6, -3.3259, -2.2224, 6, -3.3259, 0.7803, 6, -3.9232, -2.8285, 6, -2.8285, -2.8285, 6, -2.8285, 0.7803, 6, -3.9232, -3.3259, 6, -2.2224, -3.3259, 6, -2.2224, 0.7803, 6, -3.9232, -3.6956, 6, -1.5308, -3.6956, 6, -1.5308, 0.7803, 6, -3.9232, -3.9232, 6, -0.7805, -3.9232, 6, -0.7805, 0.7803, 6, -3.9232, -4, 6, -0.0001, -4, 6, -0.0001, 0.7803, 6, -3.9232, -3.9232, 6, 0.7803, -3.9232, 6, 0.7803, 0.7803, 6, -3.9232, -3.6956, 6, 1.5307, -3.6956, 6, 1.5307, 0.7803, 6, -3.9232, -3.3259, 6, 2.2223, -3.3259, 6, 2.2223, 0.7803, 6, -3.9232, -2.8285, 6, 2.8284, -2.8285, 6, 2.8284, 0.7803, 6, -3.9232, -2.2224, 6, 3.3258, -2.2224, 6, 3.3258, 0.7803, 6, -3.9232, -1.5308, 6, 3.6954, -1.5308, 6, 3.6954, 0.7803, 6, -3.9232, -0.7805, 6, 3.9231, -0.7805, 6, 3.9231, 0.7803, 6, -3.9232, -0.0001, 6, 4, -0.0001, 6, 4, 0.7803, 6, -3.9232, 0.7803, 6, 3.9231, 0.7803, 6, 3.9231, 0.7803, 6, -3.9232, 1.5307, 6, 3.6954, 1.5307, 6, 3.6954, 0.7803, 6, -3.9232, 2.2223, 6, 3.3258, 2.2223, 6, 3.3258, 0.7803, 6, -3.9232, 2.8284, 6, 2.8284, 2.8284, 6, 2.8284, 0.7803, 6, -3.9232, 3.3258, 6, 2.2223, 3.3258, 6, 2.2223, 0.7803, 6, -3.9232, 3.6954, 6, 1.5307, 3.6954, 6, 1.5307, 0.7803, 6, -3.9232, 3.9231, 6, 0.7803, 3.9231, 6, 0.7803, 0.7803, 6, -3.9232, 4, 6, -0.0001, 4, 6, -0.0001, 0.7803, 6, -3.9232, 3.9231, 6, -0.7805, 3.9231, 6, -0.7805, 0.7803, 6, -3.9232, 3.6954, 6, -1.5308, 3.6954, 6, -1.5308, 0.7803, 6, -3.9232, 3.3258, 6, -2.2224, 3.3258, 6, -2.2224, 0.7803, 6, -3.9232, 2.8284, 6, -2.8285, 2.8284, 6, -2.8285, 0.7803, 6, -3.9232, 2.2223, 6, -3.3259, 2.2223, 6, -3.3259, 0.7803, 6, -3.9232, 1.5307, 6, -3.6956, -1.5308, 6, -3.6956, -1.5308, -6, -3.6956, -0.7805, 6, -3.9232, -0.7805, 6, -3.9232, -1.5308, -6, -3.6956, -0.7805, -6, -3.9232, -0.7805, 6, -3.9232, -0.7805, -6, -3.9232, -0.0001, 6, -4, -0.0001, 6, -4, -0.7805, -6, -3.9232, -0.0001, -6, -4, 0.7803, -6, -3.9232, -0.0001, -6, -4, 1.5307, -6, -3.6956, 1.5307, -6, -3.6956, -0.0001, -6, -4, 2.2223, -6, -3.3259, 2.2223, -6, -3.3259, -0.0001, -6, -4, 2.8284, -6, -2.8285, 2.8284, -6, -2.8285, -0.0001, -6, -4, 3.3258, -6, -2.2224, 3.3258, -6, -2.2224, -0.0001, -6, -4, 3.6954, -6, -1.5308, 3.6954, -6, -1.5308, -0.0001, -6, -4, 3.9231, -6, -0.7805, 3.9231, -6, -0.7805, -0.0001, -6, -4, 4, -6, -0.0001, 4, -6, -0.0001, -0.0001, -6, -4, 3.9231, -6, 0.7803, 3.9231, -6, 0.7803, -0.0001, -6, -4, 3.6954, -6, 1.5307, 3.6954, -6, 1.5307, -0.0001, -6, -4, 3.3258, -6, 2.2223, 3.3258, -6, 2.2223, -0.0001, -6, -4, 2.8284, -6, 2.8284, 2.8284, -6, 2.8284, -0.0001, -6, -4, 2.2223, -6, 3.3258, 2.2223, -6, 3.3258, -0.0001, -6, -4, 1.5307, -6, 3.6954, 1.5307, -6, 3.6954, -0.0001, -6, -4, 0.7803, -6, 3.9231, 0.7803, -6, 3.9231, -0.0001, -6, -4, -0.0001, -6, 4, -0.0001, -6, 4, -0.0001, -6, -4, -0.7805, -6, 3.9231, -0.7805, -6, 3.9231, -0.0001, -6, -4, -1.5308, -6, 3.6954, -1.5308, -6, 3.6954, -0.0001, -6, -4, -2.2224, -6, 3.3258, -2.2224, -6, 3.3258, -0.0001, -6, -4, -2.8285, -6, 2.8284, -2.8285, -6, 2.8284, -0.0001, -6, -4, -3.3259, -6, 2.2223, -3.3259, -6, 2.2223, -0.0001, -6, -4, -3.6956, -6, 1.5307, -3.6956, -6, 1.5307, -0.0001, -6, -4, -3.9232, -6, 0.7803, -3.9232, -6, 0.7803, -0.0001, -6, -4, -4, -6, -0.0001, -4, -6, -0.0001, -0.0001, -6, -4, -3.9232, -6, -0.7805, -3.9232, -6, -0.7805, -0.0001, -6, -4, -3.6956, -6, -1.5308, -3.6956, -6, -1.5308, -0.0001, -6, -4, -3.3259, -6, -2.2224, -3.3259, -6, -2.2224, -0.0001, -6, -4, -2.8285, -6, -2.8285, -2.8285, -6, -2.8285, -0.0001, -6, -4, -2.2224, -6, -3.3259, -2.2224, -6, -3.3259, -0.0001, -6, -4, -1.5308, -6, -3.6956, -1.5308, -6, -3.6956, -0.0001, -6, -4, -0.7805, -6, -3.9232) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_6idi3"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_saigg"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -325,7 +325,7 @@ shader_parameter/inflation_pixellation = 10.0 [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_p1wtp"] data = PackedVector3Array(-1.5, 0, -6, -1.5, 0, 6, -1.5, 3, -6, -1.5, 3, -6, -1.5, 0, 6, -1.5, 3, 6, 1.5, 0, 6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, 6, 1.5, 0, -6, 1.5, 3, -6, -1.5, 0, 6, -1.5, 0, -6, 1.5, 0, 6, 1.5, 0, 6, -1.5, 0, -6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, -6, -1.5, 3, 6, -1.5, 3, 6, 1.5, 3, -6, -1.5, 3, -6) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_sh2xs"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_ia0wb"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -351,7 +351,7 @@ shader_parameter/inflation_pixellation = 10.0 [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_2l4r6"] data = PackedVector3Array(-1.5, 0, -6, -1.5, 0, 6, -1.5, 3, -6, -1.5, 3, -6, -1.5, 0, 6, -1.5, 3, 6, 1.5, 0, 6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, 6, 1.5, 0, -6, 1.5, 3, -6, -1.5, 0, 6, -1.5, 0, -6, 1.5, 0, 6, 1.5, 0, 6, -1.5, 0, -6, 1.5, 0, -6, 1.5, 3, 6, 1.5, 3, -6, -1.5, 3, 6, -1.5, 3, 6, 1.5, 3, -6, -1.5, 3, -6) -[sub_resource type="ShaderMaterial" id="ShaderMaterial_tpfln"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_tx1dy"] resource_local_to_scene = true render_priority = 0 shader = ExtResource("5_rdjtm") @@ -405,7 +405,7 @@ skeleton = NodePath("GunkBody") mask_dim = 128 mesh_instance = NodePath("..") initial_mask = ExtResource("2_2roq2") -source_gunk_material = SubResource("ShaderMaterial_hrvvi") +source_gunk_material = SubResource("ShaderMaterial_sh2xs") [node name="CollisionShape3D" type="CollisionShape3D" parent="Geometry/Icosahedron/GunkBody"] shape = SubResource("ConcavePolygonShape3D_nxc47") @@ -418,7 +418,7 @@ skeleton = NodePath("GunkBody") [node name="GunkBody" parent="Geometry/Monkey" node_paths=PackedStringArray("mesh_instance") instance=ExtResource("1_a67lu")] mask_dim = 128 mesh_instance = NodePath("..") -source_gunk_material = SubResource("ShaderMaterial_2218n") +source_gunk_material = SubResource("ShaderMaterial_tpfln") [node name="CollisionShape3D" type="CollisionShape3D" parent="Geometry/Monkey/GunkBody"] shape = SubResource("ConcavePolygonShape3D_hvf6a") @@ -432,7 +432,7 @@ skeleton = NodePath("GunkBody") [node name="GunkBody" parent="Geometry/Cube" node_paths=PackedStringArray("mesh_instance") instance=ExtResource("1_a67lu")] mask_dim = 512 mesh_instance = NodePath("..") -source_gunk_material = SubResource("ShaderMaterial_fk1xc") +source_gunk_material = SubResource("ShaderMaterial_2218n") [node name="CollisionShape3D" type="CollisionShape3D" parent="Geometry/Cube/GunkBody"] shape = SubResource("ConcavePolygonShape3D_0qjrr") @@ -445,7 +445,7 @@ skeleton = NodePath("GunkBody") [node name="GunkBody" parent="Geometry/Cylinder" node_paths=PackedStringArray("mesh_instance") instance=ExtResource("1_a67lu")] mask_dim = 512 mesh_instance = NodePath("..") -source_gunk_material = SubResource("ShaderMaterial_6fwow") +source_gunk_material = SubResource("ShaderMaterial_j0yby") [node name="CollisionShape3D" type="CollisionShape3D" parent="Geometry/Cylinder/GunkBody"] shape = SubResource("ConcavePolygonShape3D_6ood3") @@ -462,7 +462,7 @@ mesh = ExtResource("7_fk1xc") skeleton = NodePath("GunkBody") [node name="GunkBody" parent="LevelTiles/Hallway1" instance=ExtResource("1_a67lu")] -source_gunk_material = SubResource("ShaderMaterial_6idi3") +source_gunk_material = SubResource("ShaderMaterial_saigg") [node name="CollisionShape3D" type="CollisionShape3D" parent="LevelTiles/Hallway1/GunkBody"] shape = SubResource("ConcavePolygonShape3D_p1wtp") @@ -479,7 +479,7 @@ mesh = ExtResource("8_hrvvi") skeleton = NodePath("GunkBody") [node name="GunkBody" parent="LevelTiles/Hallway2" instance=ExtResource("1_a67lu")] -source_gunk_material = SubResource("ShaderMaterial_sh2xs") +source_gunk_material = SubResource("ShaderMaterial_ia0wb") [node name="CollisionShape3D" type="CollisionShape3D" parent="LevelTiles/Hallway2/GunkBody"] shape = SubResource("ConcavePolygonShape3D_2l4r6") @@ -496,7 +496,7 @@ mesh = ExtResource("9_2roq2") skeleton = NodePath("GunkBody") [node name="GunkBody" parent="LevelTiles/Hallway3" instance=ExtResource("1_a67lu")] -source_gunk_material = SubResource("ShaderMaterial_tpfln") +source_gunk_material = SubResource("ShaderMaterial_tx1dy") [node name="CollisionShape3D" type="CollisionShape3D" parent="LevelTiles/Hallway3/GunkBody"] shape = SubResource("ConcavePolygonShape3D_tmxet") diff --git a/src/util/editor_arrow/editor_arrow.gd b/src/util/editor_arrow/editor_arrow.gd new file mode 100644 index 0000000..9d3a0de --- /dev/null +++ b/src/util/editor_arrow/editor_arrow.gd @@ -0,0 +1,23 @@ +@tool +class_name EditorArrow extends MeshInstance3D + +const SCALE_BUFFER := 0.1 + +@export var target: Node3D + +var cached_target_position: Vector3 +var cached_position: Vector3 + + +func _process(_delta: float) -> void: + if ( + is_instance_valid(target) + and (global_position != cached_position or target.global_position != cached_target_position) + ): + var up := global_basis.y + if up.cross(target.global_position).length_squared() < 0.001: + up = global_basis.x + look_at(target.global_position, up) + scale.z = max(0.001, global_position.distance_to(target.global_position) - SCALE_BUFFER) + cached_target_position = target.global_position + cached_position = global_position diff --git a/src/util/editor_arrow/editor_arrow.gd.uid b/src/util/editor_arrow/editor_arrow.gd.uid new file mode 100644 index 0000000..77c8aa5 --- /dev/null +++ b/src/util/editor_arrow/editor_arrow.gd.uid @@ -0,0 +1 @@ +uid://civv6xocvw6gp diff --git a/src/util/editor_arrow/editor_arrow.gd~ b/src/util/editor_arrow/editor_arrow.gd~ new file mode 100644 index 0000000..1a13ca9 --- /dev/null +++ b/src/util/editor_arrow/editor_arrow.gd~ @@ -0,0 +1,12 @@ +@tool +class_name EditorArrow extends MeshInstance3D + +@export var target: Node3D + + +func _process(_delta: float) -> void: + if is_instance_valid(target): + look_at(target.global_position, global_basis.y) + scale.z = global_position.distance_to(target.global_position) + else: + queue_free() diff --git a/src/util/editor_arrow/editor_arrow.tscn b/src/util/editor_arrow/editor_arrow.tscn new file mode 100644 index 0000000..cb30921 --- /dev/null +++ b/src/util/editor_arrow/editor_arrow.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=4 format=3 uid="uid://ghdsr1b4hpr8"] + +[ext_resource type="ArrayMesh" uid="uid://bgrutdse8bl8b" path="res://assets/props/arrow/arrow.obj" id="1_a3lat"] +[ext_resource type="Script" uid="uid://civv6xocvw6gp" path="res://src/util/editor_arrow/editor_arrow.gd" id="2_yk3bx"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yk3bx"] +transparency = 1 +shading_mode = 0 +albedo_color = Color(0, 1, 1, 0.501961) + +[node name="EditorArrow" type="MeshInstance3D"] +mesh = ExtResource("1_a3lat") +surface_material_override/0 = SubResource("StandardMaterial3D_yk3bx") +script = ExtResource("2_yk3bx") diff --git a/src/world/mechanics/relay/gunk_relay.gd b/src/world/mechanics/relay/gunk_relay.gd index f5c0935..6c85b6e 100644 --- a/src/world/mechanics/relay/gunk_relay.gd +++ b/src/world/mechanics/relay/gunk_relay.gd @@ -11,11 +11,16 @@ signal pulsed @export var quick_connect_to: SignalNode: set = _editor_connect +@export var editor_arrow_scene: PackedScene + var _busy := false +var _editor_arrows: Dictionary[SignalNode, EditorArrow] = {} + @onready var animation_player: AnimationPlayer = %AnimationPlayer @onready var trigger_delay: Timer = %TriggerDelay @onready var pulse_delay: Timer = %PulseDelay +@onready var editor_connections: Node3D = %EditorConnections ## Trigger this relay. @@ -70,3 +75,25 @@ func _editor_connect(node: SignalNode) -> void: self.triggered.connect(node.trigger, CONNECT_PERSIST) self.pulsed.connect(node.trigger, CONNECT_PERSIST) self.notify_property_list_changed() + + +func _process(delta: float) -> void: + super._process(delta) + if not Engine.is_editor_hint(): + return + + # Check connections + for conn: Dictionary in triggered.get_connections(): + var callable: Callable = conn.get("callable") + if callable and callable.get_object() is SignalNode: + var target: SignalNode = callable.get_object() + if target != self and not target in _editor_arrows: + var instance: EditorArrow = editor_arrow_scene.instantiate() + instance.target = target + editor_connections.add_child(instance) + _editor_arrows[target] = instance + + for target: SignalNode in _editor_arrows.keys(): + if not is_instance_valid(target): + _editor_arrows[target].queue_free() + _editor_arrows.erase(target) diff --git a/src/world/mechanics/relay/gunk_relay.tscn b/src/world/mechanics/relay/gunk_relay.tscn index afee38e..978b2c2 100644 --- a/src/world/mechanics/relay/gunk_relay.tscn +++ b/src/world/mechanics/relay/gunk_relay.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=10 format=3 uid="uid://bttust5ohud8e"] +[gd_scene load_steps=11 format=3 uid="uid://bttust5ohud8e"] [ext_resource type="Script" uid="uid://1oup50bp0pwd" path="res://src/world/mechanics/relay/gunk_relay.gd" id="1_rdv5j"] [ext_resource type="Script" uid="uid://bukihqt1lybnx" path="res://src/util/frame_skipper.gd" id="2_ipm58"] +[ext_resource type="PackedScene" uid="uid://ghdsr1b4hpr8" path="res://src/util/editor_arrow/editor_arrow.tscn" id="2_nfkbq"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gk1l0"] resource_local_to_scene = true @@ -111,6 +112,7 @@ _data = { [node name="GunkRelay" type="StaticBody3D"] collision_layer = 5 script = ExtResource("1_rdv5j") +editor_arrow_scene = ExtResource("2_nfkbq") value = 800.0 [node name="MeshInstance3D" type="MeshInstance3D" parent="."] @@ -142,5 +144,8 @@ libraries = { } speed_scale = 4.0 +[node name="EditorConnections" type="Node3D" parent="."] +unique_name_in_owner = true + [connection signal="timeout" from="TriggerDelay" to="." method="_on_trigger_delay_timeout"] [connection signal="timeout" from="PulseDelay" to="." method="_on_pulse_delay_timeout"]