-
Notifications
You must be signed in to change notification settings - Fork 24
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
OpenXR: Add interaction profiles for hand tracking #236
Conversation
Signed-off-by: Daniel Adams <[email protected]>
Marking as draft as this is still a bit rough, but in its current state is at least functional |
Signed-off-by: Daniel Adams <[email protected]>
a37a559
to
19d5b5a
Compare
Signed-off-by: Daniel Adams <[email protected]>
webxr/openxr/input.rs
Outdated
let hand = self.hand_tracker.as_ref().and_then(|tracker| { | ||
Some(locate_hand( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and_then + Some is the same is equivalent to map, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a subtle difference (after removing unneeded ? and Some()), using map+locate_hand returns an Option<Option<Box<Hand<JointFrame>>>>
, using and_then+locate_hand flattens it to just Option<Box<Hand<JointFrame>>>
Signed-off-by: Daniel Adams <[email protected]>
Signed-off-by: Daniel Adams <[email protected]>
Signed-off-by: Daniel Adams <[email protected]>
Signed-off-by: Daniel Adams <[email protected]>
Signed-off-by: Daniel Adams <[email protected]>
This expands the handling for hand tracking in OpenXR to be able to better get both aim pose and select status from hand trackers, as previously it was relying on hardcoded actions that don't exist in every runtime. This should supersede #151 as well