Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do actions work ? #4

Open
gabr1gus opened this issue May 2, 2022 · 2 comments
Open

How do actions work ? #4

gabr1gus opened this issue May 2, 2022 · 2 comments

Comments

@gabr1gus
Copy link

gabr1gus commented May 2, 2022

I am having some problems to implement a osgXR action https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_eye_gaze_interaction
I could not understand how I am supposed to go about implementing it, I tried something like:

actionSet = new osgXR::ActionSet(manager, "user_intent", "User Intent");
actionPose = new osgXR::ActionPose(actionSet, "gaze_pose", "Gaze pose");
interactionProfile = new osgXR::InteractionProfile(manager, "ext", "eye_gaze_interaction");
subAction = new osgXR::Subaction(manager, "/user/eyes_ext/input/gaze_ext/pose");

actionPose->addSubaction(subAction);
interactionProfile ->suggestBinding(actionPose, "/user/eyes_ext/input/gaze_ext/pose");
actionSet->activate(subAction);

syncActionSetup();
actionSet->activate(subAction);
manager->syncSettings()
manager->update()

and then tried to get the location with:

osgXR::ActionPose::Location location = action->getValue(subAction);

however, the location is always empty.

I also made a minor change to the osgXR code to enable the XR_EXT_eye_gaze_interaction extension that is needed for this action as I couldn't find a way to enable extensions without doing so.

What am I missing ?

@amalon
Copy link
Owner

amalon commented May 2, 2022

Hi.
OTOH I think the subaction path would be just "/user/eyes_ext"? (its mentioned as the "user path" in the spec)

I'm not opposed to adding the ability to enable arbitrary extensions if its useful.

@amalon
Copy link
Owner

amalon commented Jun 18, 2022

hi @gabr1gus. Did you manage to get the eye gaze working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants