From 9e56e7a3ceabc5c65e9ae749be5981eb61b49370 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Thu, 8 Jun 2023 12:05:20 +1000 Subject: Add support for the OpenXR Eye gaze interaction extension Co-authored-by: Bastiaan Olij --- modules/openxr/action_map/openxr_action_map.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/openxr/action_map/openxr_action_map.cpp') diff --git a/modules/openxr/action_map/openxr_action_map.cpp b/modules/openxr/action_map/openxr_action_map.cpp index 6d79e33de8..72866f1cf7 100644 --- a/modules/openxr/action_map/openxr_action_map.cpp +++ b/modules/openxr/action_map/openxr_action_map.cpp @@ -206,7 +206,8 @@ void OpenXRActionMap::create_default_action_sets() { "/user/vive_tracker_htcx/role/waist," "/user/vive_tracker_htcx/role/chest," "/user/vive_tracker_htcx/role/camera," - "/user/vive_tracker_htcx/role/keyboard"); + "/user/vive_tracker_htcx/role/keyboard," + "/user/eyes_ext"); Ref aim_pose = action_set->add_new_action("aim_pose", "Aim pose", OpenXRAction::OPENXR_ACTION_POSE, "/user/hand/left,/user/hand/right"); Ref grip_pose = action_set->add_new_action("grip_pose", "Grip pose", OpenXRAction::OPENXR_ACTION_POSE, "/user/hand/left,/user/hand/right"); Ref palm_pose = action_set->add_new_action("palm_pose", "Palm pose", OpenXRAction::OPENXR_ACTION_POSE, "/user/hand/left,/user/hand/right"); @@ -503,6 +504,11 @@ void OpenXRActionMap::create_default_action_sets() { "/user/vive_tracker_htcx/role/camera/output/haptic," "/user/vive_tracker_htcx/role/keyboard/output/haptic"); add_interaction_profile(profile); + + // Create our eye gaze interaction profile + profile = OpenXRInteractionProfile::new_profile("/interaction_profiles/ext/eye_gaze_interaction"); + profile->add_new_binding(default_pose, "/user/eyes_ext/input/gaze_ext/pose"); + add_interaction_profile(profile); } void OpenXRActionMap::create_editor_action_sets() { -- cgit v1.2.3