From dbe9f48dcc23d6370a5c0b156967f02c1c8b3e93 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Mon, 5 Aug 2024 15:50:57 +1000 Subject: [PATCH] Updated OpenXR hand tracking demo based on Godot changes in PR 95153 --- xr/openxr_hand_tracking_demo/README.md | 2 +- .../hand_controller.gd.uid | 1 + xr/openxr_hand_tracking_demo/hand_info.gd | 27 ++- xr/openxr_hand_tracking_demo/hand_mesh.gd.uid | 1 + xr/openxr_hand_tracking_demo/main.tscn | 25 +- .../openxr_action_map.tres | 214 +++++++++++++----- xr/openxr_hand_tracking_demo/project.godot | 7 + .../xr_hand_fallback_modifier_3d.gd.uid | 1 + 8 files changed, 204 insertions(+), 74 deletions(-) create mode 100644 xr/openxr_hand_tracking_demo/hand_controller.gd.uid create mode 100644 xr/openxr_hand_tracking_demo/hand_mesh.gd.uid create mode 100644 xr/openxr_hand_tracking_demo/xr_hand_fallback_modifier_3d.gd.uid diff --git a/xr/openxr_hand_tracking_demo/README.md b/xr/openxr_hand_tracking_demo/README.md index 92f5c437..f01f810d 100644 --- a/xr/openxr_hand_tracking_demo/README.md +++ b/xr/openxr_hand_tracking_demo/README.md @@ -8,7 +8,7 @@ Renderer: Compatibility > [!NOTE] > -> This demo requires Godot 4.3 or later +> This demo requires Godot 4.4 or later ## Screenshots diff --git a/xr/openxr_hand_tracking_demo/hand_controller.gd.uid b/xr/openxr_hand_tracking_demo/hand_controller.gd.uid new file mode 100644 index 00000000..f5ce0e77 --- /dev/null +++ b/xr/openxr_hand_tracking_demo/hand_controller.gd.uid @@ -0,0 +1 @@ +uid://djo0o7s7ix543 diff --git a/xr/openxr_hand_tracking_demo/hand_info.gd b/xr/openxr_hand_tracking_demo/hand_info.gd index bb35bd90..3dcf9d63 100644 --- a/xr/openxr_hand_tracking_demo/hand_info.gd +++ b/xr/openxr_hand_tracking_demo/hand_info.gd @@ -2,6 +2,7 @@ extends Node3D @export_enum("Left", "Right") var hand : int = 0 +@export var fallback_mesh : Node3D # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): @@ -43,17 +44,23 @@ func _process(delta): if hand_tracker: text += "\nHand tracker found\n" - if hand_tracker.has_tracking_data: - if hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_UNKNOWN: - text += "- Source: unknown\n" - elif hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_UNOBSTRUCTED: - text += "- Source: optical hand tracking\n" - elif hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_CONTROLLER: - text += "- Source: inferred from controller\n" - else: - text += "- Source: %d\n" % [ hand_tracker.hand_tracking_source ] + # Report data source specified + if hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_UNKNOWN: + text += "- Source: unknown\n" + elif hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_UNOBSTRUCTED: + text += "- Source: optical hand tracking\n" + elif hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_CONTROLLER: + text += "- Source: inferred from controller\n" + elif hand_tracker.hand_tracking_source == XRHandTracker.HAND_TRACKING_SOURCE_NOT_TRACKED: + text += "- Source: no source\n" else: - text += "- No tracking data\n" + text += "- Source: %d\n" % [ hand_tracker.hand_tracking_source ] + + # If we're not tracking, show our fallback mesh on our controller tracking. + # If we're also not controller tracking, we can't show anything. + # Note: this is only a sphere in this example. + if fallback_mesh: + fallback_mesh.visible = not hand_tracker.has_tracking_data else: text += "\nNo hand tracker found!\n" diff --git a/xr/openxr_hand_tracking_demo/hand_mesh.gd.uid b/xr/openxr_hand_tracking_demo/hand_mesh.gd.uid new file mode 100644 index 00000000..9ccc808c --- /dev/null +++ b/xr/openxr_hand_tracking_demo/hand_mesh.gd.uid @@ -0,0 +1 @@ +uid://dxi1173oqpsr5 diff --git a/xr/openxr_hand_tracking_demo/main.tscn b/xr/openxr_hand_tracking_demo/main.tscn index 3333e643..e0f8b6f4 100644 --- a/xr/openxr_hand_tracking_demo/main.tscn +++ b/xr/openxr_hand_tracking_demo/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=3 uid="uid://br3bss6kac8pa"] +[gd_scene load_steps=18 format=3 uid="uid://br3bss6kac8pa"] [ext_resource type="PackedScene" uid="uid://d22k0sp2hinew" path="res://assets/gltf/LeftHandHumanoid.gltf" id="2_3hxem"] [ext_resource type="Script" uid="uid://dpqdbsepdkd4h" path="res://start_vr.gd" id="2_5rtkn"] @@ -6,11 +6,11 @@ [ext_resource type="PackedScene" uid="uid://byif52d1xkl3u" path="res://pickup/pickup_handler.tscn" id="3_sg1io"] [ext_resource type="Texture2D" uid="uid://b1waowk6l76ap" path="res://assets/images/pattern.png" id="4_3x0ea"] [ext_resource type="PackedScene" uid="uid://dtabh705qyufu" path="res://hand_info.tscn" id="5_wlhtu"] -[ext_resource type="Script" path="res://hand_controller.gd" id="6_e5cto"] +[ext_resource type="Script" uid="uid://djo0o7s7ix543" path="res://hand_controller.gd" id="6_e5cto"] [ext_resource type="PackedScene" uid="uid://hanl00aqvu7u" path="res://objects/table.tscn" id="6_rfmma"] [ext_resource type="PackedScene" uid="uid://cerkxyasq8t8b" path="res://objects/box.tscn" id="7_6sqt7"] -[ext_resource type="Script" path="res://hand_mesh.gd" id="7_yj2fr"] -[ext_resource type="Script" path="res://xr_hand_fallback_modifier_3d.gd" id="8_gdsnk"] +[ext_resource type="Script" uid="uid://dxi1173oqpsr5" path="res://hand_mesh.gd" id="7_yj2fr"] +[ext_resource type="Script" uid="uid://bnt74t168r248" path="res://xr_hand_fallback_modifier_3d.gd" id="8_gdsnk"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_eyx45"] sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) @@ -35,6 +35,10 @@ size = Vector2(1000, 1000) subdivide_width = 10 subdivide_depth = 10 +[sub_resource type="SphereMesh" id="SphereMesh_d5x0p"] +radius = 0.01 +height = 0.02 + [node name="Main" type="Node3D"] [node name="StartVR" type="Node3D" parent="."] @@ -76,12 +80,14 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.13752, 0.941084, 0) [node name="Box03" parent="Table" instance=ExtResource("7_6sqt7")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0746718, 1.06282, 0) -[node name="LeftHandInfo" parent="Table" instance=ExtResource("5_wlhtu")] +[node name="LeftHandInfo" parent="Table" node_paths=PackedStringArray("fallback_mesh") instance=ExtResource("5_wlhtu")] transform = Transform3D(0.939693, -0.085635, 0.331126, 0, 0.968147, 0.25038, -0.34202, -0.23528, 0.909761, -0.713026, 0.8718, -0.309953) +fallback_mesh = NodePath("../../XROrigin3D/LeftHandController/FullbackMesh") -[node name="RightHandInfo" parent="Table" instance=ExtResource("5_wlhtu")] +[node name="RightHandInfo" parent="Table" node_paths=PackedStringArray("fallback_mesh") instance=ExtResource("5_wlhtu")] transform = Transform3D(0.939693, 0.085635, -0.331126, 0, 0.968147, 0.25038, 0.34202, -0.23528, 0.909761, 0.278022, 0.8718, -0.381943) hand = 1 +fallback_mesh = NodePath("../../XROrigin3D/RightHandController/FullbackMesh") [node name="XROrigin3D" type="XROrigin3D" parent="."] @@ -95,6 +101,9 @@ pose = &"palm_pose" show_when_tracked = true script = ExtResource("6_e5cto") +[node name="FullbackMesh" type="MeshInstance3D" parent="XROrigin3D/LeftHandController"] +mesh = SubResource("SphereMesh_d5x0p") + [node name="PickupHandler" parent="XROrigin3D/LeftHandController" instance=ExtResource("3_sg1io")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.05, 0, 0) pickup_action = "pickup" @@ -106,6 +115,10 @@ pose = &"palm_pose" show_when_tracked = true script = ExtResource("6_e5cto") +[node name="FullbackMesh" type="MeshInstance3D" parent="XROrigin3D/RightHandController"] +mesh = SubResource("SphereMesh_d5x0p") +skeleton = NodePath("../../LeftHandController") + [node name="PickupHandler" parent="XROrigin3D/RightHandController" instance=ExtResource("3_sg1io")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.05, 0, 0) pickup_action = "pickup" diff --git a/xr/openxr_hand_tracking_demo/openxr_action_map.tres b/xr/openxr_hand_tracking_demo/openxr_action_map.tres index b14577ec..229511c4 100644 --- a/xr/openxr_hand_tracking_demo/openxr_action_map.tres +++ b/xr/openxr_hand_tracking_demo/openxr_action_map.tres @@ -1,4 +1,4 @@ -[gd_resource type="OpenXRActionMap" load_steps=38 format=3 uid="uid://dydgx5ktpcmdl"] +[gd_resource type="OpenXRActionMap" load_steps=63 format=3 uid="uid://dydgx5ktpcmdl"] [sub_resource type="OpenXRAction" id="OpenXRAction_ywi2s"] resource_name = "palm_pose" @@ -33,129 +33,229 @@ resource_name = "godot" localized_name = "Godot action set" actions = [SubResource("OpenXRAction_ywi2s"), SubResource("OpenXRAction_vayrd"), SubResource("OpenXRAction_h3dsb"), SubResource("OpenXRAction_ibecu"), SubResource("OpenXRAction_nhsps")] -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_r6sxc"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_6ivru"] action = SubResource("OpenXRAction_ywi2s") -paths = PackedStringArray("/user/hand/left/input/palm_ext/pose", "/user/hand/right/input/palm_ext/pose") +binding_path = "/user/hand/left/input/palm_ext/pose" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_j0h30"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_vfhwq"] +action = SubResource("OpenXRAction_ywi2s") +binding_path = "/user/hand/right/input/palm_ext/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_5w03k"] action = SubResource("OpenXRAction_vayrd") -paths = PackedStringArray("/user/hand/left/output/haptic", "/user/hand/right/output/haptic") +binding_path = "/user/hand/left/output/haptic" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_govyu"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_typ1r"] +action = SubResource("OpenXRAction_vayrd") +binding_path = "/user/hand/right/output/haptic" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_clvbf"] action = SubResource("OpenXRAction_h3dsb") -paths = PackedStringArray("/user/hand/left/input/select/click", "/user/hand/right/input/select/click") +binding_path = "/user/hand/left/input/select/click" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_l06qe"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_5bppb"] +action = SubResource("OpenXRAction_h3dsb") +binding_path = "/user/hand/right/input/select/click" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_3k6la"] action = SubResource("OpenXRAction_nhsps") -paths = PackedStringArray("/user/hand/left/input/grip/pose", "/user/hand/right/input/grip/pose") +binding_path = "/user/hand/left/input/grip/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_i8esw"] +action = SubResource("OpenXRAction_nhsps") +binding_path = "/user/hand/right/input/grip/pose" [sub_resource type="OpenXRInteractionProfile" id="OpenXRInteractionProfile_643al"] interaction_profile_path = "/interaction_profiles/khr/simple_controller" -bindings = [SubResource("OpenXRIPBinding_r6sxc"), SubResource("OpenXRIPBinding_j0h30"), SubResource("OpenXRIPBinding_govyu"), SubResource("OpenXRIPBinding_l06qe")] +bindings = [SubResource("OpenXRIPBinding_6ivru"), SubResource("OpenXRIPBinding_vfhwq"), SubResource("OpenXRIPBinding_5w03k"), SubResource("OpenXRIPBinding_typ1r"), SubResource("OpenXRIPBinding_clvbf"), SubResource("OpenXRIPBinding_5bppb"), SubResource("OpenXRIPBinding_3k6la"), SubResource("OpenXRIPBinding_i8esw")] -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_fd646"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_um1hv"] action = SubResource("OpenXRAction_h3dsb") -paths = PackedStringArray("/user/hand/left/input/grasp_ext/value", "/user/hand/right/input/grasp_ext/value") +binding_path = "/user/hand/left/input/grasp_ext/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_wkfos"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_oqnsu"] +action = SubResource("OpenXRAction_h3dsb") +binding_path = "/user/hand/right/input/grasp_ext/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_r5bl7"] action = SubResource("OpenXRAction_ywi2s") -paths = PackedStringArray("/user/hand/left/input/palm_ext/pose", "/user/hand/right/input/palm_ext/pose") +binding_path = "/user/hand/left/input/palm_ext/pose" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_qhuhw"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_ytptc"] +action = SubResource("OpenXRAction_ywi2s") +binding_path = "/user/hand/right/input/palm_ext/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_iphn4"] action = SubResource("OpenXRAction_nhsps") -paths = PackedStringArray("/user/hand/left/input/grip/pose", "/user/hand/right/input/grip/pose") +binding_path = "/user/hand/left/input/grip/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_3p2as"] +action = SubResource("OpenXRAction_nhsps") +binding_path = "/user/hand/right/input/grip/pose" [sub_resource type="OpenXRInteractionProfile" id="OpenXRInteractionProfile_nhhi0"] interaction_profile_path = "/interaction_profiles/ext/hand_interaction_ext" -bindings = [SubResource("OpenXRIPBinding_fd646"), SubResource("OpenXRIPBinding_wkfos"), SubResource("OpenXRIPBinding_qhuhw")] +bindings = [SubResource("OpenXRIPBinding_um1hv"), SubResource("OpenXRIPBinding_oqnsu"), SubResource("OpenXRIPBinding_r5bl7"), SubResource("OpenXRIPBinding_ytptc"), SubResource("OpenXRIPBinding_iphn4"), SubResource("OpenXRIPBinding_3p2as")] -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_gv55f"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_wdehm"] action = SubResource("OpenXRAction_ywi2s") -paths = PackedStringArray("/user/hand/left/input/palm_ext/pose", "/user/hand/right/input/palm_ext/pose") +binding_path = "/user/hand/left/input/palm_ext/pose" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_mp0xr"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_clfly"] +action = SubResource("OpenXRAction_ywi2s") +binding_path = "/user/hand/right/input/palm_ext/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_e1frq"] action = SubResource("OpenXRAction_h3dsb") -paths = PackedStringArray("/user/hand/left/input/squeeze/value", "/user/hand/right/input/squeeze/value") +binding_path = "/user/hand/left/input/squeeze/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_86te5"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_l7aq8"] +action = SubResource("OpenXRAction_h3dsb") +binding_path = "/user/hand/right/input/squeeze/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_oi0ij"] action = SubResource("OpenXRAction_vayrd") -paths = PackedStringArray("/user/hand/left/output/haptic", "/user/hand/right/output/haptic") +binding_path = "/user/hand/left/output/haptic" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_ma8yg"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_m08eo"] +action = SubResource("OpenXRAction_vayrd") +binding_path = "/user/hand/right/output/haptic" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_c4j1d"] action = SubResource("OpenXRAction_ibecu") -paths = PackedStringArray("/user/hand/left/input/trigger/value", "/user/hand/right/input/trigger/value") +binding_path = "/user/hand/left/input/trigger/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_ov3kx"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_sopde"] +action = SubResource("OpenXRAction_ibecu") +binding_path = "/user/hand/right/input/trigger/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_sow2k"] action = SubResource("OpenXRAction_nhsps") -paths = PackedStringArray("/user/hand/left/input/grip/pose", "/user/hand/right/input/grip/pose") +binding_path = "/user/hand/left/input/grip/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_ngwcy"] +action = SubResource("OpenXRAction_nhsps") +binding_path = "/user/hand/right/input/grip/pose" [sub_resource type="OpenXRInteractionProfile" id="OpenXRInteractionProfile_wrsh4"] interaction_profile_path = "/interaction_profiles/oculus/touch_controller" -bindings = [SubResource("OpenXRIPBinding_gv55f"), SubResource("OpenXRIPBinding_mp0xr"), SubResource("OpenXRIPBinding_86te5"), SubResource("OpenXRIPBinding_ma8yg"), SubResource("OpenXRIPBinding_ov3kx")] +bindings = [SubResource("OpenXRIPBinding_wdehm"), SubResource("OpenXRIPBinding_clfly"), SubResource("OpenXRIPBinding_e1frq"), SubResource("OpenXRIPBinding_l7aq8"), SubResource("OpenXRIPBinding_oi0ij"), SubResource("OpenXRIPBinding_m08eo"), SubResource("OpenXRIPBinding_c4j1d"), SubResource("OpenXRIPBinding_sopde"), SubResource("OpenXRIPBinding_sow2k"), SubResource("OpenXRIPBinding_ngwcy")] -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_n476d"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_r3qn1"] action = SubResource("OpenXRAction_ywi2s") -paths = PackedStringArray("/user/hand/left/input/palm_ext/pose", "/user/hand/right/input/palm_ext/pose") +binding_path = "/user/hand/left/input/palm_ext/pose" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_dh54r"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_n01b8"] +action = SubResource("OpenXRAction_ywi2s") +binding_path = "/user/hand/right/input/palm_ext/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_pjtev"] action = SubResource("OpenXRAction_h3dsb") -paths = PackedStringArray("/user/hand/left/input/squeeze/value", "/user/hand/right/input/squeeze/value") +binding_path = "/user/hand/left/input/squeeze/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_tc2nk"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_nqyri"] +action = SubResource("OpenXRAction_h3dsb") +binding_path = "/user/hand/right/input/squeeze/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_86uui"] action = SubResource("OpenXRAction_vayrd") -paths = PackedStringArray("/user/hand/left/output/haptic", "/user/hand/right/output/haptic") +binding_path = "/user/hand/left/output/haptic" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_738eg"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_nrtxc"] +action = SubResource("OpenXRAction_vayrd") +binding_path = "/user/hand/right/output/haptic" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_qovyo"] action = SubResource("OpenXRAction_ibecu") -paths = PackedStringArray("/user/hand/left/input/trigger/value", "/user/hand/right/input/trigger/value") +binding_path = "/user/hand/left/input/trigger/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_2p0gb"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_d6uso"] +action = SubResource("OpenXRAction_ibecu") +binding_path = "/user/hand/right/input/trigger/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_hvi7v"] action = SubResource("OpenXRAction_nhsps") -paths = PackedStringArray("/user/hand/left/input/grip/pose", "/user/hand/right/input/grip/pose") +binding_path = "/user/hand/left/input/grip/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_7dxun"] +action = SubResource("OpenXRAction_nhsps") +binding_path = "/user/hand/right/input/grip/pose" [sub_resource type="OpenXRInteractionProfile" id="OpenXRInteractionProfile_lah6t"] interaction_profile_path = "/interaction_profiles/valve/index_controller" -bindings = [SubResource("OpenXRIPBinding_n476d"), SubResource("OpenXRIPBinding_dh54r"), SubResource("OpenXRIPBinding_tc2nk"), SubResource("OpenXRIPBinding_738eg"), SubResource("OpenXRIPBinding_2p0gb")] +bindings = [SubResource("OpenXRIPBinding_r3qn1"), SubResource("OpenXRIPBinding_n01b8"), SubResource("OpenXRIPBinding_pjtev"), SubResource("OpenXRIPBinding_nqyri"), SubResource("OpenXRIPBinding_86uui"), SubResource("OpenXRIPBinding_nrtxc"), SubResource("OpenXRIPBinding_qovyo"), SubResource("OpenXRIPBinding_d6uso"), SubResource("OpenXRIPBinding_hvi7v"), SubResource("OpenXRIPBinding_7dxun")] -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_vhdol"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_rp8ih"] action = SubResource("OpenXRAction_ywi2s") -paths = PackedStringArray("/user/hand/left/input/palm_ext/pose", "/user/hand/right/input/palm_ext/pose") +binding_path = "/user/hand/left/input/palm_ext/pose" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_pwv0l"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_0uca0"] +action = SubResource("OpenXRAction_ywi2s") +binding_path = "/user/hand/right/input/palm_ext/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_rjtq8"] action = SubResource("OpenXRAction_h3dsb") -paths = PackedStringArray("/user/hand/left/input/squeeze/value", "/user/hand/right/input/squeeze/value") +binding_path = "/user/hand/left/input/squeeze/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_rg58l"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_lce2q"] +action = SubResource("OpenXRAction_h3dsb") +binding_path = "/user/hand/right/input/squeeze/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_ckeh6"] action = SubResource("OpenXRAction_nhsps") -paths = PackedStringArray("/user/hand/left/input/grip/pose", "/user/hand/right/input/grip/pose") +binding_path = "/user/hand/left/input/grip/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_538mi"] +action = SubResource("OpenXRAction_nhsps") +binding_path = "/user/hand/right/input/grip/pose" [sub_resource type="OpenXRInteractionProfile" id="OpenXRInteractionProfile_51rtw"] interaction_profile_path = "/interaction_profiles/microsoft/hand_interaction" -bindings = [SubResource("OpenXRIPBinding_vhdol"), SubResource("OpenXRIPBinding_pwv0l"), SubResource("OpenXRIPBinding_rg58l")] +bindings = [SubResource("OpenXRIPBinding_rp8ih"), SubResource("OpenXRIPBinding_0uca0"), SubResource("OpenXRIPBinding_rjtq8"), SubResource("OpenXRIPBinding_lce2q"), SubResource("OpenXRIPBinding_ckeh6"), SubResource("OpenXRIPBinding_538mi")] -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_plc23"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_548p5"] action = SubResource("OpenXRAction_ywi2s") -paths = PackedStringArray("/user/hand/right/input/palm_ext/pose", "/user/hand/left/input/palm_ext/pose") +binding_path = "/user/hand/right/input/palm_ext/pose" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_eus86"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_6o0wr"] +action = SubResource("OpenXRAction_ywi2s") +binding_path = "/user/hand/left/input/palm_ext/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_fsghu"] action = SubResource("OpenXRAction_h3dsb") -paths = PackedStringArray("/user/hand/left/input/squeeze/value", "/user/hand/right/input/squeeze/value") +binding_path = "/user/hand/left/input/squeeze/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_75kc0"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_88umk"] +action = SubResource("OpenXRAction_h3dsb") +binding_path = "/user/hand/right/input/squeeze/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_4uneg"] action = SubResource("OpenXRAction_vayrd") -paths = PackedStringArray("/user/hand/left/output/haptic", "/user/hand/right/output/haptic") +binding_path = "/user/hand/left/output/haptic" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_dkyu7"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_67o31"] +action = SubResource("OpenXRAction_vayrd") +binding_path = "/user/hand/right/output/haptic" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_lf1a1"] action = SubResource("OpenXRAction_ibecu") -paths = PackedStringArray("/user/hand/left/input/trigger/value", "/user/hand/right/input/trigger/value") +binding_path = "/user/hand/left/input/trigger/value" -[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_65s55"] +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_x1adc"] +action = SubResource("OpenXRAction_ibecu") +binding_path = "/user/hand/right/input/trigger/value" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_j1vtv"] action = SubResource("OpenXRAction_nhsps") -paths = PackedStringArray("/user/hand/left/input/grip/pose", "/user/hand/right/input/grip/pose") +binding_path = "/user/hand/left/input/grip/pose" + +[sub_resource type="OpenXRIPBinding" id="OpenXRIPBinding_tud50"] +action = SubResource("OpenXRAction_nhsps") +binding_path = "/user/hand/right/input/grip/pose" [sub_resource type="OpenXRInteractionProfile" id="OpenXRInteractionProfile_f3qcx"] interaction_profile_path = "/interaction_profiles/bytedance/pico4_controller" -bindings = [SubResource("OpenXRIPBinding_plc23"), SubResource("OpenXRIPBinding_eus86"), SubResource("OpenXRIPBinding_75kc0"), SubResource("OpenXRIPBinding_dkyu7"), SubResource("OpenXRIPBinding_65s55")] +bindings = [SubResource("OpenXRIPBinding_548p5"), SubResource("OpenXRIPBinding_6o0wr"), SubResource("OpenXRIPBinding_fsghu"), SubResource("OpenXRIPBinding_88umk"), SubResource("OpenXRIPBinding_4uneg"), SubResource("OpenXRIPBinding_67o31"), SubResource("OpenXRIPBinding_lf1a1"), SubResource("OpenXRIPBinding_x1adc"), SubResource("OpenXRIPBinding_j1vtv"), SubResource("OpenXRIPBinding_tud50")] [resource] action_sets = [SubResource("OpenXRActionSet_c2hwm")] diff --git a/xr/openxr_hand_tracking_demo/project.godot b/xr/openxr_hand_tracking_demo/project.godot index 6cb4143f..e5206051 100644 --- a/xr/openxr_hand_tracking_demo/project.godot +++ b/xr/openxr_hand_tracking_demo/project.godot @@ -23,6 +23,10 @@ settings/stdout/verbose_stdout=true enabled=PackedStringArray() +[physics] + +3d/physics_engine="Jolt Physics" + [rendering] renderer/rendering_method="gl_compatibility" @@ -35,5 +39,8 @@ openxr/enabled=true openxr/reference_space=2 openxr/foveation_level=2 openxr/foveation_dynamic=true +openxr/extensions/hand_tracking=true +openxr/extensions/hand_tracking_unobstructed_data_source=true +openxr/extensions/hand_tracking_controller_data_source=true openxr/extensions/hand_interaction_profile=true shaders/enabled=true diff --git a/xr/openxr_hand_tracking_demo/xr_hand_fallback_modifier_3d.gd.uid b/xr/openxr_hand_tracking_demo/xr_hand_fallback_modifier_3d.gd.uid new file mode 100644 index 00000000..98b5e070 --- /dev/null +++ b/xr/openxr_hand_tracking_demo/xr_hand_fallback_modifier_3d.gd.uid @@ -0,0 +1 @@ +uid://bnt74t168r248