xrjamfeb2025/assets/meshes/interactables/slider_snap.tscn

115 lines
5.3 KiB
Text

[gd_scene load_steps=20 format=3 uid="uid://dukyhft262nrv"]
[ext_resource type="Material" path="res://assets/wahooney.itch.io/blue_grid.tres" id="1"]
[ext_resource type="Script" path="res://addons/godot-xr-tools/interactables/interactable_slider.gd" id="2"]
[ext_resource type="Material" path="res://assets/wahooney.itch.io/brown_grid_triplanar.tres" id="3"]
[ext_resource type="Script" path="res://addons/godot-xr-tools/interactables/interactable_handle.gd" id="4"]
[ext_resource type="PackedScene" uid="uid://c25yxb0vt53vc" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_left.tscn" id="4_15h3x"]
[ext_resource type="Animation" uid="uid://db62hs5s4n2b3" path="res://addons/godot-xr-tools/hands/animations/left/Grip 4.res" id="5_t5q1b"]
[ext_resource type="Script" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="6_msqk3"]
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="7_v07ov"]
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="8_3u4ai"]
[ext_resource type="PackedScene" uid="uid://ca3daqmpo0tua" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_redirect.tscn" id="10_5fki7"]
[sub_resource type="BoxShape3D" id="1"]
size = Vector3(0.2, 0.6, 0.1)
[sub_resource type="BoxMesh" id="2"]
size = Vector3(0.2, 0.6, 0.1)
[sub_resource type="BoxShape3D" id="3"]
size = Vector3(0.04, 0.04, 0.2)
[sub_resource type="SphereShape3D" id="4"]
radius = 0.06
[sub_resource type="BoxMesh" id="5"]
size = Vector3(0.04, 0.04, 0.2)
[sub_resource type="SphereMesh" id="6"]
radius = 0.06
height = 0.12
radial_segments = 16
rings = 8
[sub_resource type="Resource" id="Resource_oadqy"]
script = ExtResource("6_msqk3")
open_pose = ExtResource("5_t5q1b")
closed_pose = ExtResource("5_t5q1b")
[sub_resource type="Resource" id="Resource_6ggfb"]
script = ExtResource("6_msqk3")
open_pose = ExtResource("8_3u4ai")
closed_pose = ExtResource("8_3u4ai")
[sub_resource type="SphereShape3D" id="7"]
margin = 0.12
radius = 0.06
[node name="SliderSnap" type="Node3D"]
[node name="Frame" type="StaticBody3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Frame"]
shape = SubResource("1")
[node name="MeshInstance3D" type="MeshInstance3D" parent="Frame"]
mesh = SubResource("2")
surface_material_override/0 = ExtResource("1")
[node name="SliderOrigin" type="Node3D" parent="."]
transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, -0.2, 0)
[node name="InteractableSlider" type="Node3D" parent="SliderOrigin"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 0, 0)
script = ExtResource("2")
slider_limit_max = 0.4
slider_steps = 0.1
slider_position = 0.2
default_position = 0.2
[node name="SliderBody" type="StaticBody3D" parent="SliderOrigin/InteractableSlider"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
[node name="BarCollision" type="CollisionShape3D" parent="SliderOrigin/InteractableSlider/SliderBody"]
shape = SubResource("3")
[node name="HandleCollision" type="CollisionShape3D" parent="SliderOrigin/InteractableSlider/SliderBody"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.1)
shape = SubResource("4")
[node name="BarMesh" type="MeshInstance3D" parent="SliderOrigin/InteractableSlider/SliderBody"]
mesh = SubResource("5")
surface_material_override/0 = ExtResource("3")
[node name="HandleMesh" type="MeshInstance3D" parent="SliderOrigin/InteractableSlider/SliderBody"]
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="SliderOrigin/InteractableSlider/SliderBody/HandleMesh" instance=ExtResource("4_15h3x")]
transform = Transform3D(-0.707107, -7.462e-08, -0.707107, 7.462e-08, -1, 3.09086e-08, -0.707107, -3.09086e-08, 0.707107, 0.0760452, -0.0474728, -0.0419973)
hand_pose = SubResource("Resource_oadqy")
[node name="GrabPointHandRight" parent="SliderOrigin/InteractableSlider/SliderBody/HandleMesh" instance=ExtResource("7_v07ov")]
transform = Transform3D(0.642788, 1.56143e-08, -0.766044, 1.56143e-08, 1, 3.34849e-08, 0.766044, -3.34849e-08, 0.642788, 0.0760452, 0.0525272, -0.0419973)
hand_pose = SubResource("Resource_6ggfb")
[node name="HandleOrigin" type="Node3D" parent="SliderOrigin/InteractableSlider"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.2)
[node name="InteractableHandle" type="RigidBody3D" parent="SliderOrigin/InteractableSlider/HandleOrigin"]
collision_layer = 262144
collision_mask = 0
freeze = true
script = ExtResource("4")
picked_up_layer = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="SliderOrigin/InteractableSlider/HandleOrigin/InteractableHandle"]
shape = SubResource("7")
[node name="GrabPointRedirectLeft" parent="SliderOrigin/InteractableSlider/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_5fki7")]
target = NodePath("../../../SliderBody/HandleMesh/GrabPointHandLeft")
[node name="GrabPointRedirectRight" parent="SliderOrigin/InteractableSlider/HandleOrigin/InteractableHandle" node_paths=PackedStringArray("target") instance=ExtResource("10_5fki7")]
target = NodePath("../../../SliderBody/HandleMesh/GrabPointHandRight")