Skip to content

Commit

Permalink
Setup interactables_demo for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
squidt committed Nov 23, 2024
1 parent 2a7f075 commit 6ca6c18
Show file tree
Hide file tree
Showing 11 changed files with 387 additions and 290 deletions.
33 changes: 14 additions & 19 deletions assets/meshes/interactables/joystick_smooth.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,49 @@ shape = SubResource("1")
mesh = SubResource("2")
surface_material_override/0 = ExtResource("1")

[node name="JoystickOrigin" type="Node3D" parent="."]
transform = Transform3D(1, -1.06581e-14, 0, 1.06581e-14, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="InteractableJoystick" type="Node3D" parent="JoystickOrigin"]
[node name="InteractableJoystick" type="Node3D" parent="."]
script = ExtResource("2")

[node name="JoystickBody" type="StaticBody3D" parent="JoystickOrigin/InteractableJoystick"]
[node name="JoystickBody" type="StaticBody3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)

[node name="BarCollision" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="BarCollision" type="CollisionShape3D" parent="InteractableJoystick/JoystickBody"]
shape = SubResource("3")

[node name="HandleCollision" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="HandleCollision" type="CollisionShape3D" parent="InteractableJoystick/JoystickBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
shape = SubResource("4")

[node name="BarMesh" type="MeshInstance3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="BarMesh" type="MeshInstance3D" parent="InteractableJoystick/JoystickBody"]
mesh = SubResource("5")
surface_material_override/0 = ExtResource("3")

[node name="HandleMesh" type="MeshInstance3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="HandleMesh" type="MeshInstance3D" parent="InteractableJoystick/JoystickBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
mesh = SubResource("6")
surface_material_override/0 = ExtResource("3")

[node name="GrabPointHandLeft" parent="JoystickOrigin/InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("4_dxrni")]
[node name="GrabPointHandLeft" parent="InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("4_dxrni")]
transform = Transform3D(-4.37114e-08, 1, -7.53641e-15, -0.707107, -3.09086e-08, -0.707107, -0.707107, -3.09086e-08, 0.707107, 0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_b7ph4")

[node name="GrabPointHandRight" parent="JoystickOrigin/InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("5_xdnkf")]
[node name="GrabPointHandRight" parent="InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("5_xdnkf")]
transform = Transform3D(-4.37114e-08, -1, -1.02355e-14, 0.642788, -2.80971e-08, -0.766044, 0.766044, -3.34849e-08, 0.642788, -0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_2v03l")

[node name="HandleOrigin" type="Node3D" parent="JoystickOrigin/InteractableJoystick"]
[node name="InteractableHandle" type="RigidBody3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)

[node name="InteractableHandle" type="RigidBody3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin"]
collision_layer = 262144
collision_mask = 0
freeze = true
script = ExtResource("4")
picked_up_layer = 0

[node name="CollisionShape3D" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableJoystick/InteractableHandle"]
shape = SubResource("7")

[node name="GrabPointRedirectLeft" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_yqm2n")]
target = NodePath("../../../JoystickBody/HandleMesh/GrabPointHandLeft")
[node name="GrabPointRedirectLeft" parent="InteractableJoystick/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_yqm2n")]
target = NodePath("../../JoystickBody/HandleMesh/GrabPointHandLeft")

[node name="GrabPointRedirectRight" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_yqm2n")]
target = NodePath("../../../JoystickBody/HandleMesh/GrabPointHandRight")
[node name="GrabPointRedirectRight" parent="InteractableJoystick/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_yqm2n")]
target = NodePath("../../JoystickBody/HandleMesh/GrabPointHandRight")
32 changes: 14 additions & 18 deletions assets/meshes/interactables/joystick_snap.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -57,56 +57,52 @@ shape = SubResource("1")
mesh = SubResource("2")
surface_material_override/0 = ExtResource("1")

[node name="JoystickOrigin" type="Node3D" parent="."]
[node name="InteractableJoystick" type="Node3D" parent="."]
transform = Transform3D(1, -1.06581e-14, 0, 1.06581e-14, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="InteractableJoystick" type="Node3D" parent="JoystickOrigin"]
script = ExtResource("2")
joystick_x_steps = 5.0
joystick_y_steps = 5.0

[node name="JoystickBody" type="StaticBody3D" parent="JoystickOrigin/InteractableJoystick"]
[node name="JoystickBody" type="StaticBody3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)

[node name="BarCollision" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="BarCollision" type="CollisionShape3D" parent="InteractableJoystick/JoystickBody"]
shape = SubResource("3")

[node name="HandleCollision" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="HandleCollision" type="CollisionShape3D" parent="InteractableJoystick/JoystickBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
shape = SubResource("4")

[node name="BarMesh" type="MeshInstance3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="BarMesh" type="MeshInstance3D" parent="InteractableJoystick/JoystickBody"]
mesh = SubResource("5")
surface_material_override/0 = ExtResource("3")

[node name="HandleMesh" type="MeshInstance3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="HandleMesh" type="MeshInstance3D" parent="InteractableJoystick/JoystickBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
mesh = SubResource("6")
surface_material_override/0 = ExtResource("3")

[node name="GrabPointHandLeft" parent="JoystickOrigin/InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("4_0rs04")]
[node name="GrabPointHandLeft" parent="InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("4_0rs04")]
transform = Transform3D(-4.37114e-08, 1, -7.53641e-15, -0.707107, -3.09086e-08, -0.707107, -0.707107, -3.09086e-08, 0.707107, 0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_xmm1u")

[node name="GrabPointHandRight" parent="JoystickOrigin/InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("7_71xbx")]
[node name="GrabPointHandRight" parent="InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("7_71xbx")]
transform = Transform3D(-4.37114e-08, -1, -1.02355e-14, 0.642788, -2.80971e-08, -0.766044, 0.766044, -3.34849e-08, 0.642788, -0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_qfirj")

[node name="HandleOrigin" type="Node3D" parent="JoystickOrigin/InteractableJoystick"]
[node name="InteractableHandle" type="RigidBody3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)

[node name="InteractableHandle" type="RigidBody3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin"]
collision_layer = 262144
collision_mask = 0
freeze = true
script = ExtResource("4")
picked_up_layer = 0

[node name="CollisionShape3D" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableJoystick/InteractableHandle"]
shape = SubResource("7")

[node name="GrabPointRedirectLeft" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_lhgvx")]
target = NodePath("../../../JoystickBody/HandleMesh/GrabPointHandLeft")
[node name="GrabPointRedirectLeft" parent="InteractableJoystick/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_lhgvx")]
target = NodePath("../../JoystickBody/HandleMesh/GrabPointHandLeft")

[node name="GrabPointRedirectRight" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_lhgvx")]
target = NodePath("../../../JoystickBody/HandleMesh/GrabPointHandRight")
[node name="GrabPointRedirectRight" parent="InteractableJoystick/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_lhgvx")]
target = NodePath("../../JoystickBody/HandleMesh/GrabPointHandRight")
32 changes: 14 additions & 18 deletions assets/meshes/interactables/joystick_zero.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -57,55 +57,51 @@ shape = SubResource("1")
mesh = SubResource("2")
surface_material_override/0 = ExtResource("1")

[node name="JoystickOrigin" type="Node3D" parent="."]
[node name="InteractableJoystick" type="Node3D" parent="."]
transform = Transform3D(1, -1.06581e-14, 0, 1.06581e-14, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="InteractableJoystick" type="Node3D" parent="JoystickOrigin"]
script = ExtResource("2")
default_on_release = true

[node name="JoystickBody" type="StaticBody3D" parent="JoystickOrigin/InteractableJoystick"]
[node name="JoystickBody" type="StaticBody3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)

[node name="BarCollision" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="BarCollision" type="CollisionShape3D" parent="InteractableJoystick/JoystickBody"]
shape = SubResource("3")

[node name="HandleCollision" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="HandleCollision" type="CollisionShape3D" parent="InteractableJoystick/JoystickBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
shape = SubResource("4")

[node name="BarMesh" type="MeshInstance3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="BarMesh" type="MeshInstance3D" parent="InteractableJoystick/JoystickBody"]
mesh = SubResource("5")
surface_material_override/0 = ExtResource("3")

[node name="HandleMesh" type="MeshInstance3D" parent="JoystickOrigin/InteractableJoystick/JoystickBody"]
[node name="HandleMesh" type="MeshInstance3D" parent="InteractableJoystick/JoystickBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
mesh = SubResource("6")
surface_material_override/0 = ExtResource("3")

[node name="GrabPointHandLeft" parent="JoystickOrigin/InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("4_i88vc")]
[node name="GrabPointHandLeft" parent="InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("4_i88vc")]
transform = Transform3D(-4.37114e-08, 1, -7.53641e-15, -0.707107, -3.09086e-08, -0.707107, -0.707107, -3.09086e-08, 0.707107, 0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_ouraf")

[node name="GrabPointHandRight" parent="JoystickOrigin/InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("7_k3kr4")]
[node name="GrabPointHandRight" parent="InteractableJoystick/JoystickBody/HandleMesh" instance=ExtResource("7_k3kr4")]
transform = Transform3D(-4.37114e-08, -1, -1.02355e-14, 0.642788, -2.80971e-08, -0.766044, 0.766044, -3.34849e-08, 0.642788, -0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_upq8k")

[node name="HandleOrigin" type="Node3D" parent="JoystickOrigin/InteractableJoystick"]
[node name="InteractableHandle" type="RigidBody3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)

[node name="InteractableHandle" type="RigidBody3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin"]
collision_layer = 262144
collision_mask = 0
freeze = true
script = ExtResource("4")
picked_up_layer = 0

[node name="CollisionShape3D" type="CollisionShape3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableJoystick/InteractableHandle"]
shape = SubResource("7")

[node name="GrabPointRedirectLeft" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_j1gnl")]
target = NodePath("../../../JoystickBody/HandleMesh/GrabPointHandLeft")
[node name="GrabPointRedirectLeft" parent="InteractableJoystick/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_j1gnl")]
target = NodePath("../../JoystickBody/HandleMesh/GrabPointHandLeft")

[node name="GrabPointRedirectRight" parent="JoystickOrigin/InteractableJoystick/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_j1gnl")]
target = NodePath("../../../JoystickBody/HandleMesh/GrabPointHandRight")
[node name="GrabPointRedirectRight" parent="InteractableJoystick/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_j1gnl")]
target = NodePath("../../JoystickBody/HandleMesh/GrabPointHandRight")
32 changes: 14 additions & 18 deletions assets/meshes/interactables/lever_smooth.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,50 @@ shape = SubResource("1")
mesh = SubResource("2")
surface_material_override/0 = ExtResource("1")

[node name="LeverOrigin" type="Node3D" parent="."]
[node name="InteractableLever" type="Node3D" parent="."]
transform = Transform3D(1, -1.06581e-14, 0, 1.06581e-14, 1, 0, 0, 0, 1, 0, 0, 0)

[node name="InteractableLever" type="Node3D" parent="LeverOrigin"]
script = ExtResource("2")

[node name="HingeBody" type="StaticBody3D" parent="LeverOrigin/InteractableLever"]
[node name="HingeBody" type="StaticBody3D" parent="InteractableLever"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)

[node name="BarCollision" type="CollisionShape3D" parent="LeverOrigin/InteractableLever/HingeBody"]
[node name="BarCollision" type="CollisionShape3D" parent="InteractableLever/HingeBody"]
shape = SubResource("3")

[node name="HandleCollision" type="CollisionShape3D" parent="LeverOrigin/InteractableLever/HingeBody"]
[node name="HandleCollision" type="CollisionShape3D" parent="InteractableLever/HingeBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
shape = SubResource("4")

[node name="BarMesh" type="MeshInstance3D" parent="LeverOrigin/InteractableLever/HingeBody"]
[node name="BarMesh" type="MeshInstance3D" parent="InteractableLever/HingeBody"]
mesh = SubResource("5")
surface_material_override/0 = ExtResource("3")

[node name="HandleMesh" type="MeshInstance3D" parent="LeverOrigin/InteractableLever/HingeBody"]
[node name="HandleMesh" type="MeshInstance3D" parent="InteractableLever/HingeBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
mesh = SubResource("6")
surface_material_override/0 = ExtResource("3")

[node name="GrabPointHandLeft" parent="LeverOrigin/InteractableLever/HingeBody/HandleMesh" instance=ExtResource("4_psbg5")]
[node name="GrabPointHandLeft" parent="InteractableLever/HingeBody/HandleMesh" instance=ExtResource("4_psbg5")]
transform = Transform3D(-4.37114e-08, 1, -7.53641e-15, -0.707107, -3.09086e-08, -0.707107, -0.707107, -3.09086e-08, 0.707107, 0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_v6sel")

[node name="GrabPointHandRight" parent="LeverOrigin/InteractableLever/HingeBody/HandleMesh" instance=ExtResource("7_xphfh")]
[node name="GrabPointHandRight" parent="InteractableLever/HingeBody/HandleMesh" instance=ExtResource("7_xphfh")]
transform = Transform3D(-4.37114e-08, -1, -1.02355e-14, 0.642788, -2.80971e-08, -0.766044, 0.766044, -3.34849e-08, 0.642788, -0.05, 0.0759278, -0.0419973)
hand_pose = SubResource("Resource_t7yav")

[node name="HandleOrigin" type="Node3D" parent="LeverOrigin/InteractableLever"]
[node name="InteractableHandle" type="RigidBody3D" parent="InteractableLever"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)

[node name="InteractableHandle" type="RigidBody3D" parent="LeverOrigin/InteractableLever/HandleOrigin"]
collision_layer = 262144
collision_mask = 0
freeze = true
script = ExtResource("4")
picked_up_layer = 0

[node name="CollisionShape3D" type="CollisionShape3D" parent="LeverOrigin/InteractableLever/HandleOrigin/InteractableHandle"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableLever/InteractableHandle"]
shape = SubResource("7")

[node name="GrabPointRedirectLeft" parent="LeverOrigin/InteractableLever/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_2yftn")]
target = NodePath("../../../HingeBody/HandleMesh/GrabPointHandLeft")
[node name="GrabPointRedirectLeft" parent="InteractableLever/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_2yftn")]
target = NodePath("../../HingeBody/HandleMesh/GrabPointHandLeft")

[node name="GrabPointRedirectRight" parent="LeverOrigin/InteractableLever/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_2yftn")]
target = NodePath("../../../HingeBody/HandleMesh/GrabPointHandRight")
[node name="GrabPointRedirectRight" parent="InteractableLever/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_2yftn")]
target = NodePath("../../HingeBody/HandleMesh/GrabPointHandRight")
Loading

0 comments on commit 6ca6c18

Please sign in to comment.