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

OpenXR: Add interaction profiles for hand tracking #236

Merged
merged 8 commits into from
Aug 12, 2024

Conversation

msub2
Copy link
Contributor

@msub2 msub2 commented Aug 9, 2024

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

@msub2
Copy link
Contributor Author

msub2 commented Aug 9, 2024

Marking as draft as this is still a bit rough, but in its current state is at least functional

@msub2 msub2 marked this pull request as ready for review August 10, 2024 06:48
webxr/openxr/input.rs Outdated Show resolved Hide resolved
webxr/openxr/input.rs Outdated Show resolved Hide resolved
webxr/openxr/input.rs Outdated Show resolved Hide resolved
Comment on lines 568 to 569
let hand = self.hand_tracker.as_ref().and_then(|tracker| {
Some(locate_hand(
Copy link
Member

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?

Copy link
Contributor Author

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>>>

@jdm jdm added this pull request to the merge queue Aug 12, 2024
Merged via the queue into servo:main with commit dd76329 Aug 12, 2024
6 checks passed
@msub2 msub2 deleted the hand-interaction-profiles branch August 12, 2024 00:29
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

Successfully merging this pull request may close these issues.

2 participants