From bbf982c2f6c15f707ee46007ee40385b8dc0c48c Mon Sep 17 00:00:00 2001 From: JonShard Date: Tue, 28 Jul 2026 09:22:03 +0200 Subject: [PATCH 1/5] Add thrown plates absorb food on station --- Containers/container.gd | 12 +++++++++--- Containers/container.tscn | 2 +- Containers/plate.tscn | 5 ++--- Scenes/JonScene.tscn | 3 +++ Stations/Hob.tscn | 2 +- kanban_tasks_data.kanban | 10 +++++----- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Containers/container.gd b/Containers/container.gd index 8464f07..52dd633 100644 --- a/Containers/container.gd +++ b/Containers/container.gd @@ -36,10 +36,15 @@ func _on_body_entered(body: Node3D) -> void: if not body.is_in_group(target_group): return print("Container _on_body_entered body: ", body) - var picked_by = xr_pickable.get_picked_up_by() - if picked_by and picked_by.is_in_group("station"): - # If compatible and enough space, add item + + # If one of us is in a station + var picked_by = xr_pickable.get_picked_up_by() + var body_pickable = body as XRToolsPickable + var body_picked_by = body_pickable.get_picked_up_by() if body_pickable else null + if (picked_by and picked_by.is_in_group("station")) or (body_picked_by and body_picked_by.is_in_group("station")): + + # If enough space, add item var food_item = body.get_node("FoodItem") print("Container in station found %s of type %s: %s" % [target_group, FoodItem.Type.keys()[food_item.type], body.name]) var meal_count := contained_items.filter(func(f): return f.type == FoodItem.Type.MEAL).size() @@ -52,6 +57,7 @@ func _on_body_entered(body: Node3D) -> void: _add_item(body) + # Contents are synced as data (ids on the plate's PlateController), not # reparented nodes: reparenting a MultiplayerSpawner-tracked item out of # WorldContent would despawn it on every client the instant it happened. diff --git a/Containers/container.tscn b/Containers/container.tscn index f2fab10..0db0167 100644 --- a/Containers/container.tscn +++ b/Containers/container.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" uid="uid://6lyhyial1fh5" path="res://Containers/container.gd" id="1_r4cle"] [sub_resource type="SphereShape3D" id="SphereShape3D_vlqg6"] -radius = 0.2 +radius = 0.3 [node name="Container" type="Node3D" unique_id=377793422 node_paths=PackedStringArray("meal_positions")] script = ExtResource("1_r4cle") diff --git a/Containers/plate.tscn b/Containers/plate.tscn index 15013f6..cd06c7f 100644 --- a/Containers/plate.tscn +++ b/Containers/plate.tscn @@ -8,7 +8,7 @@ [ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_dhtvl"] [ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_vlcpl"] [ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_el51w"] -[ext_resource type="Script" path="res://Net/net_pickable.gd" id="20_netpk"] +[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_kek77"] height = 0.0635376 @@ -153,7 +153,6 @@ polygon = PackedVector2Array(-0.053057775, 0.2586278, 0.09469998, 0.40791017, 0. depth = 0.02 material = SubResource("StandardMaterial3D_vlqg6") -[node name="NetPickable" type="MultiplayerSynchronizer" parent="."] -root_path = NodePath("..") +[node name="NetPickable" type="MultiplayerSynchronizer" parent="." unique_id=1770751620] replication_config = SubResource("SceneReplicationConfig_np_plate") script = ExtResource("20_netpk") diff --git a/Scenes/JonScene.tscn b/Scenes/JonScene.tscn index 2ea6f7b..bc130cb 100644 --- a/Scenes/JonScene.tscn +++ b/Scenes/JonScene.tscn @@ -104,6 +104,9 @@ transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -1.5 [node name="Counter3" parent="." unique_id=1498817646 instance=ExtResource("15_di04w")] transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -1.5477214, 0.5115016, 0.49258912) +[node name="Counter5" parent="Counter3" unique_id=200341072 instance=ExtResource("15_di04w")] +transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 1.8051152, 0, 3.5603657) + [node name="BurgerBunsDispenser" parent="." unique_id=1720683779 instance=ExtResource("9_sq0s2")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5242664, 0.008738995, 1.1073059) diff --git a/Stations/Hob.tscn b/Stations/Hob.tscn index e0fae15..774caf1 100644 --- a/Stations/Hob.tscn +++ b/Stations/Hob.tscn @@ -26,7 +26,7 @@ script = ExtResource("1_7jc4g") [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1283846023] shape = SubResource("BoxShape3D_kdxnr") -[node name="XRToolsSnapZone" type="Area3D" parent="." unique_id=538157739] +[node name="XRToolsSnapZone" type="Area3D" parent="." unique_id=538157739 groups=["station"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5270121, 0) collision_layer = 65536 collision_mask = 65540 diff --git a/kanban_tasks_data.kanban b/kanban_tasks_data.kanban index a3b3aed..b3d3ed7 100644 --- a/kanban_tasks_data.kanban +++ b/kanban_tasks_data.kanban @@ -17,10 +17,7 @@ "784d5cd3-333a-40a9-b35f-3d0c73f00761", "21bc19f1-ee3c-4bbb-ab9a-07ec6123a823", "d93a31cd-d475-4c5a-87fc-983174b2594f", - "9d7ecbc4-db2a-4d09-9f40-ceed3cf98c00", - "0dd511cd-592c-4334-afd8-c511bd36b7d0", - "7883d015-f065-4b18-a2ab-e2a0daa9dc81", - "caf459e5-bb88-47dd-bf15-254a3d70c30f" + "9d7ecbc4-db2a-4d09-9f40-ceed3cf98c00" ] }, { @@ -34,15 +31,18 @@ "uuid": "fab8a81b-7ca9-4026-96bb-ed66ea58ef2e", "title": "Doing", "tasks": [ - "f8073eb2-8786-47b7-b63f-fa70c3f7115a" + "f8073eb2-8786-47b7-b63f-fa70c3f7115a", + "caf459e5-bb88-47dd-bf15-254a3d70c30f" ] }, { "uuid": "0d743057-955a-473a-8123-a3f805505d5d", "title": "Done", "tasks": [ + "0dd511cd-592c-4334-afd8-c511bd36b7d0", "6942c45a-53a4-484f-9885-4f249cb4572b", "a4dd35ae-dc8e-42a3-9044-bf1cb1af281a", + "7883d015-f065-4b18-a2ab-e2a0daa9dc81", "1c3b9543-cb67-431d-bf71-c8753e816776", "d9cebd68-792e-4d01-a916-7df5f128b4a8", "eee1990e-f957-4499-84b6-e68003fcb78e", From 3f951fef64a2edac829507ccee0a621f7f81edbf Mon Sep 17 00:00:00 2001 From: JonShard Date: Tue, 28 Jul 2026 10:39:15 +0200 Subject: [PATCH 2/5] Add Items slide off dispensers --- Prefabs/slide_off_dome.tscn | 16 ++++++++++++ Scenes/cube_side_dispense.tscn | 7 ++++- Stations/BurgerBunsDispenser.tscn | 3 +++ Stations/dirt_station.tscn | 8 +++--- Stations/plate_dispenser.tscn | 4 +++ Stations/raw_burger_dispenser.tscn | 3 +++ kanban_tasks_data.kanban | 41 ++++++++++++++++++++++++++---- 7 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 Prefabs/slide_off_dome.tscn diff --git a/Prefabs/slide_off_dome.tscn b/Prefabs/slide_off_dome.tscn new file mode 100644 index 0000000..d79e7c7 --- /dev/null +++ b/Prefabs/slide_off_dome.tscn @@ -0,0 +1,16 @@ +[gd_scene format=3 uid="uid://mpapt5mkbuao"] + +[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_4m60m"] +friction = 0.0 +bounce = 1.0 + +[sub_resource type="SphereShape3D" id="SphereShape3D_nn8tr"] +radius = 0.2752769 + +[node name="SlideOffDome" type="StaticBody3D" unique_id=1427609426] +collision_layer = 7 +physics_material_override = SubResource("PhysicsMaterial_4m60m") + +[node name="CollisionShape3D2" type="CollisionShape3D" parent="." unique_id=513124640] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.99165964, 0) +shape = SubResource("SphereShape3D_nn8tr") diff --git a/Scenes/cube_side_dispense.tscn b/Scenes/cube_side_dispense.tscn index 93ba7bf..cda25fb 100644 --- a/Scenes/cube_side_dispense.tscn +++ b/Scenes/cube_side_dispense.tscn @@ -3,11 +3,13 @@ [ext_resource type="Script" uid="uid://0y6wnjcsum6" path="res://Stations/item_dispenser.gd" id="1_4m60m"] [ext_resource type="PackedScene" uid="uid://e4i6o5oriecx" path="res://Items/PickupCube.tscn" id="2_nn8tr"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="3_ahn1e"] +[ext_resource type="PackedScene" uid="uid://mpapt5mkbuao" path="res://Prefabs/slide_off_dome.tscn" id="4_nn8tr"] [sub_resource type="SphereShape3D" id="SphereShape3D_xmbo2"] radius = 0.3 [sub_resource type="CylinderShape3D" id="CylinderShape3D_24d3s"] +radius = 0.29541016 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_24d3s"] albedo_color = Color(0.1764706, 1, 1, 1) @@ -29,15 +31,18 @@ snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" [node name="CollisionShape3D" type="CollisionShape3D" parent="XRToolsSnapZone" unique_id=182042233] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.15291119, 0) shape = SubResource("SphereShape3D_xmbo2") [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1974757539] shape = SubResource("CylinderShape3D_24d3s") +[node name="SlideOffDome" parent="." unique_id=1427609426 instance=ExtResource("4_nn8tr")] + [node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=1172420592] [node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=1073546772] -radius = 0.4 +radius = 0.3 sides = 32 [node name="Cubes" type="Node3D" parent="." unique_id=100532970] diff --git a/Stations/BurgerBunsDispenser.tscn b/Stations/BurgerBunsDispenser.tscn index 69b4e35..43038cf 100644 --- a/Stations/BurgerBunsDispenser.tscn +++ b/Stations/BurgerBunsDispenser.tscn @@ -3,6 +3,7 @@ [ext_resource type="Script" uid="uid://0y6wnjcsum6" path="res://Stations/item_dispenser.gd" id="1_myl3s"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="1_p30r1"] [ext_resource type="PackedScene" uid="uid://c0lknik4noobs" path="res://Items/BurgerBuns.tscn" id="2_1q74o"] +[ext_resource type="PackedScene" uid="uid://mpapt5mkbuao" path="res://Prefabs/slide_off_dome.tscn" id="4_rf1b2"] [sub_resource type="SphereShape3D" id="SphereShape3D_xmbo2"] radius = 0.3 @@ -31,6 +32,8 @@ shape = SubResource("SphereShape3D_xmbo2") [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1470079357] shape = SubResource("CylinderShape3D_24d3s") +[node name="SlideOffDome" parent="." unique_id=1427609426 instance=ExtResource("4_rf1b2")] + [node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=1746426494] [node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=858311379] diff --git a/Stations/dirt_station.tscn b/Stations/dirt_station.tscn index 97301df..d9f5858 100644 --- a/Stations/dirt_station.tscn +++ b/Stations/dirt_station.tscn @@ -13,8 +13,8 @@ albedo_color = Color(0.45262197, 0.26770625, 0.2601587, 1) material = SubResource("StandardMaterial3D_qn1ku") size = Vector3(0.5, 1, 0.5) -[sub_resource type="SphereShape3D" id="SphereShape3D_dlkho"] -radius = 0.3 +[sub_resource type="BoxShape3D" id="BoxShape3D_mep2a"] +size = Vector3(0.81640625, 0.5635376, 0.79351807) [node name="DirtStation" type="StaticBody3D" unique_id=160842153 groups=["station"]] script = ExtResource("1_hc1d4") @@ -39,5 +39,5 @@ snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" [node name="CollisionShape3D2" type="CollisionShape3D" parent="XRToolsSnapZone" unique_id=1398712192] -transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.000975132, 0) -shape = SubResource("SphereShape3D_dlkho") +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0.008666992, -0.11009073, -0.009353638) +shape = SubResource("BoxShape3D_mep2a") diff --git a/Stations/plate_dispenser.tscn b/Stations/plate_dispenser.tscn index 929c26b..1c88687 100644 --- a/Stations/plate_dispenser.tscn +++ b/Stations/plate_dispenser.tscn @@ -3,6 +3,7 @@ [ext_resource type="Script" uid="uid://0y6wnjcsum6" path="res://Stations/item_dispenser.gd" id="1_jm0ik"] [ext_resource type="PackedScene" uid="uid://bp3v1jl8pctro" path="res://Containers/plate.tscn" id="2_tfo2i"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="3_lr065"] +[ext_resource type="PackedScene" uid="uid://mpapt5mkbuao" path="res://Prefabs/slide_off_dome.tscn" id="4_tfo2i"] [sub_resource type="SphereShape3D" id="SphereShape3D_xmbo2"] radius = 0.3 @@ -28,6 +29,9 @@ shape = SubResource("SphereShape3D_xmbo2") [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=831688237] shape = SubResource("CylinderShape3D_24d3s") +[node name="SlideOffDome" parent="." unique_id=1427609426 instance=ExtResource("4_tfo2i")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.061363697, 0) + [node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=696108271] [node name="CSGCylinder3D" type="CSGCylinder3D" parent="CSGCombiner3D" unique_id=1339763385] diff --git a/Stations/raw_burger_dispenser.tscn b/Stations/raw_burger_dispenser.tscn index 0878f53..2c1a532 100644 --- a/Stations/raw_burger_dispenser.tscn +++ b/Stations/raw_burger_dispenser.tscn @@ -4,6 +4,7 @@ [ext_resource type="PackedScene" uid="uid://dpot5qie20vf6" path="res://Items/burger.tscn" id="2_mep2a"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="3_3xuvi"] [ext_resource type="Texture2D" uid="uid://cexxfyw03hr81" path="res://Textures/1.png" id="4_1f5le"] +[ext_resource type="PackedScene" uid="uid://mpapt5mkbuao" path="res://Prefabs/slide_off_dome.tscn" id="5_mep2a"] [sub_resource type="SphereShape3D" id="SphereShape3D_xmbo2"] radius = 0.3 @@ -29,6 +30,8 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" [node name="CollisionShape3D" type="CollisionShape3D" parent="XRToolsSnapZone" unique_id=2105824734] shape = SubResource("SphereShape3D_xmbo2") +[node name="SlideOffDome" parent="." unique_id=1427609426 instance=ExtResource("5_mep2a")] + [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=378049928] shape = SubResource("CylinderShape3D_24d3s") diff --git a/kanban_tasks_data.kanban b/kanban_tasks_data.kanban index e168f81..813bb22 100644 --- a/kanban_tasks_data.kanban +++ b/kanban_tasks_data.kanban @@ -14,7 +14,8 @@ "854c7e1e-7521-4bcd-83ff-bb3fecec3142", "4e2ca8d1-84e1-4913-ad8f-834007d52160", "dd822d14-88e5-4790-808e-7d2cf7f79133", - "784d5cd3-333a-40a9-b35f-3d0c73f00761" + "784d5cd3-333a-40a9-b35f-3d0c73f00761", + "9d7ecbc4-db2a-4d09-9f40-ceed3cf98c00" ] }, { @@ -27,17 +28,19 @@ { "uuid": "fab8a81b-7ca9-4026-96bb-ed66ea58ef2e", "title": "Doing", - "tasks": [] + "tasks": [ + "f8073eb2-8786-47b7-b63f-fa70c3f7115a" + ] }, { "uuid": "0d743057-955a-473a-8123-a3f805505d5d", "title": "Done", "tasks": [ - "0dd511cd-592c-4334-afd8-c511bd36b7d0", - "6942c45a-53a4-484f-9885-4f249cb4572b", - "f8073eb2-8786-47b7-b63f-fa70c3f7115a", + "caf459e5-bb88-47dd-bf15-254a3d70c30f", "21bc19f1-ee3c-4bbb-ab9a-07ec6123a823", "d93a31cd-d475-4c5a-87fc-983174b2594f", + "0dd511cd-592c-4334-afd8-c511bd36b7d0", + "6942c45a-53a4-484f-9885-4f249cb4572b", "a4dd35ae-dc8e-42a3-9044-bf1cb1af281a", "7883d015-f065-4b18-a2ab-e2a0daa9dc81", "1c3b9543-cb67-431d-bf71-c8753e816776", @@ -243,6 +246,34 @@ "description": "", "category": "bf4ec62e-526e-4027-876f-0b22bd17f79a", "steps": [] + }, + { + "uuid": "9d7ecbc4-db2a-4d09-9f40-ceed3cf98c00", + "title": "Add test that a hob can chain cook", + "description": "", + "category": "bf4ec62e-526e-4027-876f-0b22bd17f79a", + "steps": [] + }, + { + "uuid": "0dd511cd-592c-4334-afd8-c511bd36b7d0", + "title": "Plates should snap onto Meals in a station", + "description": "Trowing a plate onto a hamburger on a hob should result in a plated hamburger", + "category": "bf4ec62e-526e-4027-876f-0b22bd17f79a", + "steps": [] + }, + { + "uuid": "7883d015-f065-4b18-a2ab-e2a0daa9dc81", + "title": "Snap_zones should abosrb any item in range", + "description": "", + "category": "bf4ec62e-526e-4027-876f-0b22bd17f79a", + "steps": [] + }, + { + "uuid": "caf459e5-bb88-47dd-bf15-254a3d70c30f", + "title": "Station Snap_zones should cover the whole station", + "description": "", + "category": "bf4ec62e-526e-4027-876f-0b22bd17f79a", + "steps": [] } ], "layout": { From 7d694de3076ae88691fe4f5489c5f8e48ab11e36 Mon Sep 17 00:00:00 2001 From: JonShard Date: Tue, 28 Jul 2026 10:39:34 +0200 Subject: [PATCH 3/5] Add DespawningItem --- Containers/container.gd | 3 ++ Items/BurgerBuns.tscn | 3 ++ Items/Charcoal.tscn | 8 ++-- Items/PickupCube.tscn | 8 ++-- Items/burger.tscn | 8 ++-- Items/cooked_burger.tscn | 8 ++-- Items/hamburger.tscn | 8 ++-- Prefabs/despawning_item.gd | 43 +++++++++++++++++ Prefabs/despawning_item.gd.uid | 1 + Prefabs/despawning_item.tscn | 6 +++ Scenes/JonScene.tscn | 6 +-- Scenes/test_small.tscn | 84 ++++++++++++++++++++++++++++++++++ 12 files changed, 168 insertions(+), 18 deletions(-) create mode 100644 Prefabs/despawning_item.gd create mode 100644 Prefabs/despawning_item.gd.uid create mode 100644 Prefabs/despawning_item.tscn create mode 100644 Scenes/test_small.tscn diff --git a/Containers/container.gd b/Containers/container.gd index 52dd633..2ceb2db 100644 --- a/Containers/container.gd +++ b/Containers/container.gd @@ -193,6 +193,9 @@ func _make_cosmetic(visual: Node3D) -> void: func _remove_from_physics(visual: Node3D) -> void: if visual is RigidBody3D: PhysicsServer3D.body_set_space((visual as RigidBody3D).get_rid(), RID()) + var despawning_item = visual.get_node_or_null("DespawningItem") + if despawning_item: + NetworkManager.despawn_item(despawning_item) #plate (Pickalbe) diff --git a/Items/BurgerBuns.tscn b/Items/BurgerBuns.tscn index f42f0d0..59a7237 100644 --- a/Items/BurgerBuns.tscn +++ b/Items/BurgerBuns.tscn @@ -8,6 +8,7 @@ [ext_resource type="Animation" uid="uid://bediglpx0rj7i" path="res://addons/godot-xr-tools/hands/animations/left/Grip 5.res" id="6_ftab3"] [ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="7_wb51u"] [ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="8_t9y3x"] +[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_46e7r"] [ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_vlqg6"] @@ -88,3 +89,5 @@ type = 2 [node name="NetPickable" type="MultiplayerSynchronizer" parent="." index="6" unique_id=2086885420] replication_config = SubResource("SceneReplicationConfig_np_buns") script = ExtResource("20_netpk") + +[node name="DespawningItem" parent="." index="7" unique_id=303090111 instance=ExtResource("10_46e7r")] diff --git a/Items/Charcoal.tscn b/Items/Charcoal.tscn index 4762c56..c9ec3f1 100644 --- a/Items/Charcoal.tscn +++ b/Items/Charcoal.tscn @@ -8,7 +8,8 @@ [ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_cp3eg"] [ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="7_mde49"] [ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="8_wmrff"] -[ext_resource type="Script" path="res://Net/net_pickable.gd" id="20_netpk"] +[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_6ypk4"] +[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_gkni8"] height = 0.1 @@ -66,7 +67,8 @@ type = 2 [node name="CombinableItem" parent="." index="5" unique_id=996936271 instance=ExtResource("8_wmrff")] -[node name="NetPickable" type="MultiplayerSynchronizer" parent="."] -root_path = NodePath("..") +[node name="NetPickable" type="MultiplayerSynchronizer" parent="." index="6" unique_id=1070495412] replication_config = SubResource("SceneReplicationConfig_np_charcoal") script = ExtResource("20_netpk") + +[node name="DespawningItem" parent="." index="7" unique_id=303090111 instance=ExtResource("10_6ypk4")] diff --git a/Items/PickupCube.tscn b/Items/PickupCube.tscn index b00c9e2..901274e 100644 --- a/Items/PickupCube.tscn +++ b/Items/PickupCube.tscn @@ -7,8 +7,9 @@ [ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_a0a5b"] [ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_bdp75"] [ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="7_bdp75"] +[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_uygc5"] [ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="11_vjw41"] -[ext_resource type="Script" path="res://Net/net_pickable.gd" id="20_netpk"] +[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="BoxShape3D" id="BoxShape3D_m1xbq"] size = Vector3(0.1, 0.1, 0.1) @@ -63,7 +64,8 @@ type = 1 [node name="CombinableItem" parent="." index="5" unique_id=996936271 instance=ExtResource("7_bdp75")] -[node name="NetPickable" type="MultiplayerSynchronizer" parent="."] -root_path = NodePath("..") +[node name="NetPickable" type="MultiplayerSynchronizer" parent="." index="6" unique_id=1858332513] replication_config = SubResource("SceneReplicationConfig_np_cube") script = ExtResource("20_netpk") + +[node name="DespawningItem" parent="." index="7" unique_id=303090111 instance=ExtResource("10_uygc5")] diff --git a/Items/burger.tscn b/Items/burger.tscn index 0d49d37..993fd91 100644 --- a/Items/burger.tscn +++ b/Items/burger.tscn @@ -7,8 +7,9 @@ [ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="5_w8sii"] [ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="6_mvnl5"] [ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="7_wqxjj"] +[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_l4hsd"] [ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="10_yxtxs"] -[ext_resource type="Script" path="res://Net/net_pickable.gd" id="20_netpk"] +[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_fco8w"] height = 0.0338974 @@ -62,7 +63,8 @@ hand_pose = SubResource("Resource_qyiot") id = "raw_burger" type = 2 -[node name="NetPickable" type="MultiplayerSynchronizer" parent="."] -root_path = NodePath("..") +[node name="NetPickable" type="MultiplayerSynchronizer" parent="." index="5" unique_id=1382968688] replication_config = SubResource("SceneReplicationConfig_np_burger") script = ExtResource("20_netpk") + +[node name="DespawningItem" parent="." index="6" unique_id=303090111 instance=ExtResource("10_l4hsd")] diff --git a/Items/cooked_burger.tscn b/Items/cooked_burger.tscn index d5ebd5c..1909b01 100644 --- a/Items/cooked_burger.tscn +++ b/Items/cooked_burger.tscn @@ -6,9 +6,10 @@ [ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="5_ychvb"] [ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="6_etdv2"] [ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="7_rl64h"] +[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_6p8pj"] [ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="10_ut7mg"] [ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="10_zz42p"] -[ext_resource type="Script" path="res://Net/net_pickable.gd" id="20_netpk"] +[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_fco8w"] height = 0.04777527 @@ -64,7 +65,8 @@ type = 2 [node name="CombinableItem" parent="." index="5" unique_id=996936271 instance=ExtResource("10_ut7mg")] -[node name="NetPickable" type="MultiplayerSynchronizer" parent="."] -root_path = NodePath("..") +[node name="NetPickable" type="MultiplayerSynchronizer" parent="." index="6" unique_id=925955029] replication_config = SubResource("SceneReplicationConfig_np_cookedburger") script = ExtResource("20_netpk") + +[node name="DespawningItem" parent="." index="7" unique_id=303090111 instance=ExtResource("10_6p8pj")] diff --git a/Items/hamburger.tscn b/Items/hamburger.tscn index 3bddd7c..e11b269 100644 --- a/Items/hamburger.tscn +++ b/Items/hamburger.tscn @@ -7,7 +7,8 @@ [ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_dunns"] [ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_fh0f6"] [ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="7_yy3y8"] -[ext_resource type="Script" path="res://Net/net_pickable.gd" id="20_netpk"] +[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="9_ej8jm"] +[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_fco8w"] height = 0.10392761 @@ -94,7 +95,8 @@ id = "hamburger" type = 0 sell_value = 4 -[node name="NetPickable" type="MultiplayerSynchronizer" parent="."] -root_path = NodePath("..") +[node name="NetPickable" type="MultiplayerSynchronizer" parent="." index="6" unique_id=56164120] replication_config = SubResource("SceneReplicationConfig_np_hamburger") script = ExtResource("20_netpk") + +[node name="DespawningItem" parent="." index="7" unique_id=303090111 instance=ExtResource("9_ej8jm")] diff --git a/Prefabs/despawning_item.gd b/Prefabs/despawning_item.gd new file mode 100644 index 0000000..43b1cc6 --- /dev/null +++ b/Prefabs/despawning_item.gd @@ -0,0 +1,43 @@ +extends Node +class_name DespawningItem + +@export var time_to_despawn: float = 8 + +# The minimum speed required to reset despawn timer. +@export var minimum_speed_square: float = 0.1 + + +@onready var _pickable: XRToolsPickable = get_parent() as XRToolsPickable +@onready var _rigid: RigidBody3D = get_parent() as RigidBody3D + + +var _time_left: float = time_to_despawn + +func _ready() -> void: + if not _pickable: + push_error("DespawningItem must be a grand child of an XRToolsPickable.") + return + if not _rigid: + push_error("DespawningItem must be a grand child of an RigidBody3D.") + return + + +func _process(delta: float) -> void: + print("SpeedSquare: ", _rigid.linear_velocity.length_squared()) + # if we're held or moving, reset timer and return + if _pickable.get_picked_up_by() or _rigid.linear_velocity.length_squared() > pow(minimum_speed_square,2): + _time_left = time_to_despawn + get_parent().visible = true + print("DespawningItem resetting timer: ", get_parent()) + return + + + # Count down to zero and despawn + _time_left -= delta + if _time_left <= 0: + print("DespawningItem despawning!" , get_parent()) + NetworkManager.despawn_item(get_parent()) + + # Make item blink in and out before despawning + if _time_left < time_to_despawn / 2: + get_parent().visible = int(_time_left * 5.0) %2 == 0 diff --git a/Prefabs/despawning_item.gd.uid b/Prefabs/despawning_item.gd.uid new file mode 100644 index 0000000..a291957 --- /dev/null +++ b/Prefabs/despawning_item.gd.uid @@ -0,0 +1 @@ +uid://deyna316ka4xs diff --git a/Prefabs/despawning_item.tscn b/Prefabs/despawning_item.tscn new file mode 100644 index 0000000..db144d0 --- /dev/null +++ b/Prefabs/despawning_item.tscn @@ -0,0 +1,6 @@ +[gd_scene format=3 uid="uid://b5ukku8i0hilb"] + +[ext_resource type="Script" uid="uid://deyna316ka4xs" path="res://Prefabs/despawning_item.gd" id="1_ayqk8"] + +[node name="DespawningItem" type="Node" unique_id=303090111] +script = ExtResource("1_ayqk8") diff --git a/Scenes/JonScene.tscn b/Scenes/JonScene.tscn index 90224ef..6ef015a 100644 --- a/Scenes/JonScene.tscn +++ b/Scenes/JonScene.tscn @@ -114,9 +114,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5242664, 0.008738995, 1.10 [node name="RawBurgerDispenser" parent="." unique_id=235630131 instance=ExtResource("11_ctden")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.8896122, 0.008738995, 1.0872328) -[node name="CubeSideDispenser2" parent="." unique_id=200950572 instance=ExtResource("12_57ppd")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.47788578, 0.008738995, 1.1293952) - [node name="PlateDispenser" parent="." unique_id=710538846 instance=ExtResource("13_irf4n")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.26631236, 0.008738995, 1.087036) @@ -130,3 +127,6 @@ scene_properties_keys = PackedStringArray("game_over_panel.gd") [node name="controler" type="Node" parent="GameOverPanel" unique_id=803158176] script = ExtResource("16_n8fyw") + +[node name="CubeSideDispenser2" parent="." unique_id=200950572 instance=ExtResource("12_57ppd")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.35154933, 0, 1.1119425) diff --git a/Scenes/test_small.tscn b/Scenes/test_small.tscn new file mode 100644 index 0000000..08676dd --- /dev/null +++ b/Scenes/test_small.tscn @@ -0,0 +1,84 @@ +[gd_scene format=3 uid="uid://dbgu4r127ke5v"] + +[ext_resource type="Script" uid="uid://b4ldkd3ngs0vp" path="res://main.gd" id="1_1ymas"] +[ext_resource type="Sky" uid="uid://c1abtpwhdm2d5" path="res://Textures/sky/NightSkyHDRI009_16K.tres" id="2_1jq86"] +[ext_resource type="PackedScene" uid="uid://j5s5wus7tuhb" path="res://XROrigin.tscn" id="3_bryd6"] +[ext_resource type="Material" uid="uid://cmia50cfqxxo4" path="res://Textures/dev_material_3d.tres" id="4_kpgm6"] +[ext_resource type="PackedScene" uid="uid://j7caslh27nor" path="res://Stations/Hob.tscn" id="5_gfdi7"] +[ext_resource type="PackedScene" uid="uid://dvrk268s7gkxh" path="res://Stations/sink.tscn" id="6_fmmg3"] +[ext_resource type="PackedScene" uid="uid://efaec6ymgabo" path="res://Stations/Counter.tscn" id="7_jnxsa"] +[ext_resource type="PackedScene" uid="uid://e4i6o5oriecx" path="res://Items/PickupCube.tscn" id="8_xl5nn"] + +[sub_resource type="Environment" id="Environment_bvwq1"] +background_mode = 2 +sky = ExtResource("2_1jq86") +ambient_light_source = 3 +ambient_light_color = Color(1, 1, 1, 1) +ambient_light_sky_contribution = 0.9 +reflected_light_source = 2 +ssr_enabled = true +ssao_enabled = true +ssil_enabled = true +sdfgi_enabled = true + +[sub_resource type="BoxShape3D" id="BoxShape3D_vlqg6"] +size = Vector3(20, 0.1, 20) + +[sub_resource type="BoxMesh" id="BoxMesh_24d3s"] +material = ExtResource("4_kpgm6") +size = Vector3(20, 0.1, 20) + +[sub_resource type="BoxShape3D" id="BoxShape3D_24d3s"] +size = Vector3(20, 10, 0.1) + +[node name="Main" type="Node3D" unique_id=1312265607] +script = ExtResource("1_1ymas") + +[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1177077250] +environment = SubResource("Environment_bvwq1") + +[node name="XROrigin3D" parent="." unique_id=2055526621 instance=ExtResource("3_bryd6")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9667189, 0) + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1376644384] +transform = Transform3D(-0.8660254, -0.43301278, 0.24999999, 0.3022632, -0.05510214, 0.9516306, -0.39829266, 0.8997021, 0.17860365, 0, 0, 0) + +[node name="Floor" type="StaticBody3D" parent="." unique_id=122279514] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.05, 0) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Floor" unique_id=958841648] +shape = SubResource("BoxShape3D_vlqg6") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Floor/CollisionShape3D" unique_id=1939997056] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00018164515, 0.0006352663, -0.002532661) +mesh = SubResource("BoxMesh_24d3s") + +[node name="InvisibleWalls" type="StaticBody3D" parent="." unique_id=315740174] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="InvisibleWalls" unique_id=33059670] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.688614, 8.838269) +shape = SubResource("BoxShape3D_24d3s") + +[node name="CollisionShape3D2" type="CollisionShape3D" parent="InvisibleWalls" unique_id=2018792171] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.688614, -10.243342) +shape = SubResource("BoxShape3D_24d3s") + +[node name="CollisionShape3D3" type="CollisionShape3D" parent="InvisibleWalls" unique_id=757662929] +transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, -9.807113, 4.688614, -0.018813243) +shape = SubResource("BoxShape3D_24d3s") + +[node name="CollisionShape3D4" type="CollisionShape3D" parent="InvisibleWalls" unique_id=1468386997] +transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 9.934778, 4.297072, -0.018813023) +shape = SubResource("BoxShape3D_24d3s") + +[node name="Hob" parent="." unique_id=1687971542 instance=ExtResource("5_gfdi7")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.35077858, 0.50655985, -1.2833805) + +[node name="Sink" parent="." unique_id=2055277359 instance=ExtResource("6_fmmg3")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.24685252, 0.51461196, -1.2828919) + +[node name="Counter" parent="." unique_id=1487893288 instance=ExtResource("7_jnxsa")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.94890714, 0.5115015, -1.3041471) + +[node name="PickableObject" parent="." unique_id=1675596942 instance=ExtResource("8_xl5nn")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.87560004, 1.5534955, -1.2869046) From b9c9a3b73a3bc5500ab785072b002d4aaaff1c78 Mon Sep 17 00:00:00 2001 From: JonShard Date: Tue, 28 Jul 2026 13:11:53 +0200 Subject: [PATCH 4/5] Add more snap_zone sounds --- Prefabs/despawning_item.gd | 2 -- Stations/Counter.tscn | 4 +++- Stations/Hob.tscn | 5 +++++ Stations/table.tscn | 17 +++++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Prefabs/despawning_item.gd b/Prefabs/despawning_item.gd index 43b1cc6..a5462ed 100644 --- a/Prefabs/despawning_item.gd +++ b/Prefabs/despawning_item.gd @@ -23,12 +23,10 @@ func _ready() -> void: func _process(delta: float) -> void: - print("SpeedSquare: ", _rigid.linear_velocity.length_squared()) # if we're held or moving, reset timer and return if _pickable.get_picked_up_by() or _rigid.linear_velocity.length_squared() > pow(minimum_speed_square,2): _time_left = time_to_despawn get_parent().visible = true - print("DespawningItem resetting timer: ", get_parent()) return diff --git a/Stations/Counter.tscn b/Stations/Counter.tscn index aa5f8d0..c010d1f 100644 --- a/Stations/Counter.tscn +++ b/Stations/Counter.tscn @@ -1,7 +1,7 @@ [gd_scene format=3 uid="uid://efaec6ymgabo"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="1_dlkho"] -[ext_resource type="AudioStream" uid="uid://claw3d2wnyr6a" path="res://Sounds/220212__gameaudio__ping-bing.wav" id="2_0aadn"] +[ext_resource type="AudioStream" uid="uid://bqtk1adk8umbx" path="res://Sounds/220197__gameaudio__click-basic.wav" id="2_0aadn"] [sub_resource type="BoxShape3D" id="BoxShape3D_24d3s"] size = Vector3(0.6, 1, 0.6) @@ -36,6 +36,8 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.002, 0) shape = SubResource("BoxShape3D_1ntq7") +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="XRToolsSnapZone" unique_id=1786831079] + [node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=451757283] use_collision = true diff --git a/Stations/Hob.tscn b/Stations/Hob.tscn index f5b3a87..f1f0ea3 100644 --- a/Stations/Hob.tscn +++ b/Stations/Hob.tscn @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://bsn8vhv5adxdo" path="res://Stations/hob.gd" id="1_7jc4g"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="2_er1dp"] +[ext_resource type="AudioStream" uid="uid://bqtk1adk8umbx" path="res://Sounds/220197__gameaudio__click-basic.wav" id="3_6oyg1"] [ext_resource type="PackedScene" uid="uid://bxbocxdaayvwx" path="res://UI/progress_bar.tscn" id="3_7uuqv"] [sub_resource type="BoxShape3D" id="BoxShape3D_kdxnr"] @@ -135,6 +136,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5270121, 0) collision_layer = 65536 collision_mask = 65540 script = ExtResource("2_er1dp") +stash_sound = ExtResource("3_6oyg1") snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" @@ -142,6 +144,9 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.000975132, 0) shape = SubResource("BoxShape3D_7uuqv") +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="XRToolsSnapZone" unique_id=1991627595] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.022546828, -0.5270121, 0.36528283) + [node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=70901698] [node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D" unique_id=1111505172] diff --git a/Stations/table.tscn b/Stations/table.tscn index 4451e05..43465ff 100644 --- a/Stations/table.tscn +++ b/Stations/table.tscn @@ -2,6 +2,7 @@ [ext_resource type="Script" uid="uid://caeikc7e3igkd" path="res://Stations/table.gd" id="1_2vcpj"] [ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="1_8j1nt"] +[ext_resource type="AudioStream" uid="uid://daiv8ubwdbidf" path="res://Sounds/220195__gameaudio__click-wooden-1.wav" id="3_0s6ir"] [ext_resource type="PackedScene" uid="uid://bxbocxdaayvwx" path="res://UI/progress_bar.tscn" id="3_kjf1i"] [sub_resource type="BoxShape3D" id="BoxShape3D_24d3s"] @@ -35,6 +36,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.31874347, 0.5270121, 0) collision_layer = 65536 collision_mask = 65540 script = ExtResource("1_8j1nt") +stash_sound = ExtResource("3_0s6ir") snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" @@ -42,11 +44,15 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.000975132, 0) shape = SubResource("SphereShape3D_dlkho") +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="XRToolsSnapZone" unique_id=2135860710] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.022546828, -0.5270121, 0.36528283) + [node name="XRToolsSnapZone2" type="Area3D" parent="." unique_id=694448387 groups=["station"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.34755045, 0.5270121, 0) collision_layer = 65536 collision_mask = 65540 script = ExtResource("1_8j1nt") +stash_sound = ExtResource("3_0s6ir") snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" @@ -54,11 +60,15 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.000975132, 0) shape = SubResource("SphereShape3D_dlkho") +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="XRToolsSnapZone2" unique_id=709529410] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.022546828, -0.5270121, 0.36528283) + [node name="XRToolsSnapZone3" type="Area3D" parent="." unique_id=1734026785 groups=["station"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.012355864, 0.5270121, 0.33038777) collision_layer = 65536 collision_mask = 65540 script = ExtResource("1_8j1nt") +stash_sound = ExtResource("3_0s6ir") snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" @@ -66,11 +76,15 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.000975132, 0) shape = SubResource("SphereShape3D_dlkho") +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="XRToolsSnapZone3" unique_id=2000860662] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.022546828, -0.5270121, 0.36528283) + [node name="XRToolsSnapZone4" type="Area3D" parent="." unique_id=1358457948 groups=["station"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.022546828, 0.5270121, -0.36528283) collision_layer = 65536 collision_mask = 65540 script = ExtResource("1_8j1nt") +stash_sound = ExtResource("3_0s6ir") snap_mode = 1 metadata/_custom_type_script = "uid://cquqe4f1m1sw6" @@ -78,6 +92,9 @@ metadata/_custom_type_script = "uid://cquqe4f1m1sw6" transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.000975132, 0) shape = SubResource("SphereShape3D_dlkho") +[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="XRToolsSnapZone4" unique_id=790672192] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.022546828, -0.5270121, 0.36528283) + [node name="CSGCombiner3D" type="CSGCombiner3D" parent="." unique_id=2085635675] [node name="CSGBox3D" type="CSGBox3D" parent="CSGCombiner3D" unique_id=411048765] From 0872271c8c44eb973cdce9d73f2eb2087bb03c3e Mon Sep 17 00:00:00 2001 From: JonShard Date: Tue, 28 Jul 2026 14:47:24 +0200 Subject: [PATCH 5/5] Fix player collides with items on floor --- XROrigin.tscn | 1 + 1 file changed, 1 insertion(+) diff --git a/XROrigin.tscn b/XROrigin.tscn index 25cdeab..6d22471 100644 --- a/XROrigin.tscn +++ b/XROrigin.tscn @@ -48,4 +48,5 @@ show_laser = 2 show_target = true [node name="PlayerBody" parent="." unique_id=1444632058 instance=ExtResource("4_6xr3x")] +collision_mask = 1017 player_calibrate_height = false