diff --git a/WIP/head_selector_function_pointer.gd b/WIP/head_selector_function_pointer.gd deleted file mode 100644 index 0e0b7b69..00000000 --- a/WIP/head_selector_function_pointer.gd +++ /dev/null @@ -1,27 +0,0 @@ -extends XRToolsSceneBase - -func _ready() -> void: - $Options.position = $XROrigin3D/XRCamera3D.position - $Options.rotation.y = $XROrigin3D/XRCamera3D.rotation.y - enable_buttons() - -func reactivate_buttons() -> void: - await get_tree().create_timer(1).timeout - enable_buttons() - - -func enable_buttons() -> void: - $Options/OptionALabel.modulate = Color("white") - $Options/OptionBLabel.modulate = Color("white") - - -func _on_area_3da_pointer_event(event: Variant) -> void: - if event.event_type == XRToolsPointerEvent.Type.PRESSED: - $Options/OptionALabel.modulate = Color("red") - reactivate_buttons() - - -func _on_area_3db_pointer_event(event: Variant) -> void: - if event.event_type == XRToolsPointerEvent.Type.PRESSED: - $Options/OptionBLabel.modulate = Color("red") - reactivate_buttons() diff --git a/WIP/head_selector_function_pointer.tscn b/WIP/head_selector_function_pointer.tscn deleted file mode 100644 index dd320a7a..00000000 --- a/WIP/head_selector_function_pointer.tscn +++ /dev/null @@ -1,58 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://b7jmrxrx0388r"] - -[ext_resource type="Script" path="res://WIP/head_selector_function_pointer.gd" id="1_8qnhd"] -[ext_resource type="PackedScene" uid="uid://cqhw276realc" path="res://addons/godot-xr-tools/functions/function_pointer.tscn" id="2_0qnno"] -[ext_resource type="Script" path="res://WIP/xr_interactable_area.gd" id="3_687xp"] - -[sub_resource type="SphereShape3D" id="SphereShape3D_mla2p"] - -[node name="HeadSelectorFunctionPointer" type="Node3D"] -script = ExtResource("1_8qnhd") - -[node name="XROrigin3D" type="XROrigin3D" parent="."] - -[node name="XRCamera3D" type="XRCamera3D" parent="XROrigin3D"] - -[node name="FunctionPointer" parent="XROrigin3D/XRCamera3D" instance=ExtResource("2_0qnno")] -y_offset = 0.0 -show_laser = 0 -show_target = true -collide_with_bodies = false -collide_with_areas = true - -[node name="LeftHandTracker" type="XRController3D" parent="XROrigin3D"] -tracker = &"left_hand" -pose = &"aim" - -[node name="RightHandTracker" type="XRController3D" parent="XROrigin3D"] -tracker = &"right_hand" -pose = &"aim" - -[node name="Options" type="Node3D" parent="."] - -[node name="OptionALabel" type="Label3D" parent="Options"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.6, 0, -1.5) -text = "Option A -" - -[node name="Area3DA" type="Area3D" parent="Options/OptionALabel"] -collision_layer = 1048576 -script = ExtResource("3_687xp") - -[node name="CollisionShape3D" type="CollisionShape3D" parent="Options/OptionALabel/Area3DA"] -shape = SubResource("SphereShape3D_mla2p") - -[node name="OptionBLabel" type="Label3D" parent="Options"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.6, 0, -1.5) -text = "Option B -" - -[node name="Area3DB" type="Area3D" parent="Options/OptionBLabel"] -collision_layer = 1048576 -script = ExtResource("3_687xp") - -[node name="CollisionShape3D" type="CollisionShape3D" parent="Options/OptionBLabel/Area3DB"] -shape = SubResource("SphereShape3D_mla2p") - -[connection signal="pointer_event" from="Options/OptionALabel/Area3DA" to="." method="_on_area_3da_pointer_event"] -[connection signal="pointer_event" from="Options/OptionBLabel/Area3DB" to="." method="_on_area_3db_pointer_event"] diff --git a/WIP/xr_interactable_area.gd b/WIP/xr_interactable_area.gd deleted file mode 100644 index 6ef0cba3..00000000 --- a/WIP/xr_interactable_area.gd +++ /dev/null @@ -1 +0,0 @@ -extends XRToolsInteractableArea diff --git a/addons/godot-xr-tools/functions/function_pointer.tscn b/addons/godot-xr-tools/functions/function_pointer.tscn index dad525ea..0d17ef1f 100644 --- a/addons/godot-xr-tools/functions/function_pointer.tscn +++ b/addons/godot-xr-tools/functions/function_pointer.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=9 format=3 uid="uid://cqhw276realc"] -[ext_resource type="Material" uid="uid://lrh532eckgmj" path="res://addons/godot-xr-tools/materials/pointer.tres" id="1"] +[ext_resource type="Material" path="res://addons/godot-xr-tools/materials/pointer.tres" id="1"] [ext_resource type="Script" path="res://addons/godot-xr-tools/functions/function_pointer.gd" id="2"] -[ext_resource type="Shader" uid="uid://ysca35gaav86" path="res://WIP/hold_button_gaze_pointer_visualshader.tres" id="3_8hxux"] +[ext_resource type="Shader" uid="uid://ysca35gaav86" path="res://addons/godot-xr-tools/misc/hold_button_gaze_pointer_visualshader.tres" id="3_8hxux"] [sub_resource type="BoxMesh" id="1"] resource_local_to_scene = true diff --git a/WIP/hold_button_gaze_pointer_visualshader.tres b/addons/godot-xr-tools/misc/hold_button_gaze_pointer_visualshader.tres similarity index 100% rename from WIP/hold_button_gaze_pointer_visualshader.tres rename to addons/godot-xr-tools/misc/hold_button_gaze_pointer_visualshader.tres