Skip to content

Commit

Permalink
Setup 'interactables_demo'
Browse files Browse the repository at this point in the history
  • Loading branch information
squidt committed Nov 28, 2024
1 parent bd605c8 commit 4c7e466
Show file tree
Hide file tree
Showing 11 changed files with 436 additions and 305 deletions.
37 changes: 16 additions & 21 deletions assets/meshes/interactables/joystick_smooth.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ script = ExtResource("6_fogq8")
open_pose = ExtResource("8_vbsbw")
closed_pose = ExtResource("8_vbsbw")

[sub_resource type="SphereShape3D" id="7"]
[sub_resource type="SphereShape3D" id="SphereShape3D_opb5a"]
margin = 0.12
radius = 0.06

Expand All @@ -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"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)
[node name="HandleOrigin" type="Node3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.200422)

[node name="InteractableHandle" type="RigidBody3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin"]
[node name="InteractableHandle" type="RigidBody3D" parent="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"]
shape = SubResource("7")
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableJoystick/HandleOrigin/InteractableHandle"]
shape = SubResource("SphereShape3D_opb5a")

[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/HandleOrigin/InteractableHandle" instance=ExtResource("10_yqm2n")]

[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/HandleOrigin/InteractableHandle" instance=ExtResource("10_yqm2n")]
37 changes: 16 additions & 21 deletions assets/meshes/interactables/joystick_snap.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ script = ExtResource("6_ni3r3")
open_pose = ExtResource("8_hhwxc")
closed_pose = ExtResource("8_hhwxc")

[sub_resource type="SphereShape3D" id="7"]
[sub_resource type="SphereShape3D" id="SphereShape3D_etvag"]
margin = 0.12
radius = 0.06

Expand All @@ -57,56 +57,51 @@ 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")
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"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)
[node name="HandleOrigin" type="Node3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.200422)

[node name="InteractableHandle" type="RigidBody3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin"]
[node name="InteractableHandle" type="RigidBody3D" parent="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"]
shape = SubResource("7")
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableJoystick/HandleOrigin/InteractableHandle"]
shape = SubResource("SphereShape3D_etvag")

[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/HandleOrigin/InteractableHandle" instance=ExtResource("10_lhgvx")]

[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/HandleOrigin/InteractableHandle" instance=ExtResource("10_lhgvx")]
37 changes: 16 additions & 21 deletions assets/meshes/interactables/joystick_zero.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ script = ExtResource("6_ve8n7")
open_pose = ExtResource("8_4ywv1")
closed_pose = ExtResource("8_4ywv1")

[sub_resource type="SphereShape3D" id="7"]
[sub_resource type="SphereShape3D" id="SphereShape3D_ovvxh"]
margin = 0.12
radius = 0.06

Expand All @@ -57,55 +57,50 @@ 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")
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"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)
[node name="HandleOrigin" type="Node3D" parent="InteractableJoystick"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.200422)

[node name="InteractableHandle" type="RigidBody3D" parent="JoystickOrigin/InteractableJoystick/HandleOrigin"]
[node name="InteractableHandle" type="RigidBody3D" parent="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"]
shape = SubResource("7")
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractableJoystick/HandleOrigin/InteractableHandle"]
shape = SubResource("SphereShape3D_ovvxh")

[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/HandleOrigin/InteractableHandle" instance=ExtResource("10_j1gnl")]

[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/HandleOrigin/InteractableHandle" instance=ExtResource("10_j1gnl")]
30 changes: 14 additions & 16 deletions assets/meshes/interactables/lever_smooth.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,52 @@ 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"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)
[node name="HandleOrigin" type="Node3D" parent="InteractableLever"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.200422)

[node name="InteractableHandle" type="RigidBody3D" parent="LeverOrigin/InteractableLever/HandleOrigin"]
[node name="InteractableHandle" type="RigidBody3D" parent="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/HandleOrigin/InteractableHandle"]
shape = SubResource("7")

[node name="GrabPointRedirectLeft" parent="LeverOrigin/InteractableLever/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_2yftn")]
[node name="GrabPointRedirectLeft" parent="InteractableLever/HandleOrigin/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")]
[node name="GrabPointRedirectRight" parent="InteractableLever/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_2yftn")]
target = NodePath("../../../HingeBody/HandleMesh/GrabPointHandRight")
Loading

0 comments on commit 4c7e466

Please sign in to comment.