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

[Lynx] Workaround a runtime bug not reporting tracked hand positions #1681

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

svillar
Copy link
Member

@svillar svillar commented Jan 14, 2025

Lynx runtime never returns the XR_SPACE_LOCATION_POSITION_TRACKED_BIT flag as active, even if it's really actively tracking the position of the hands. That confused the code and made it think that emulated positions were returned instead.

That was causing the origin of the aim pose (and thus the origin of the aim ray) to be incorrectly shifted from the hands. The workaround is replacing the check for POSITION_TRACKED_BIT by POSITION_VALID_BIT. That way we'd still be able to detected when hands are not tracked while providing a much better aim.

Lynx runtime never returns the XR_SPACE_LOCATION_POSITION_TRACKED_BIT
flag as active, even if it's really actively tracking the position
of the hands. That confused the code and made it think that emulated
positions were returned instead.

That was causing the origin of the aim pose (and thus the origin
of the aim ray) to be incorrectly shifted from the hands. The
workaround is replacing the check for POSITION_TRACKED_BIT by
POSITION_VALID_BIT. That way we'd still be able to detected when
hands are not tracked while providing a much better aim.
@svillar svillar added the release_candidate PR that should be part of the next release label Jan 14, 2025
@svillar
Copy link
Member Author

svillar commented Jan 14, 2025

Before (note how the ray origin is way bellow the hand):
lynx-before

After:
lynx-after

app/src/openxr/cpp/OpenXRInputSource.cpp Outdated Show resolved Hide resolved
@javifernandez javifernandez self-requested a review January 15, 2025 11:09
@svillar svillar merged commit ba1e64c into main Jan 15, 2025
22 checks passed
@svillar svillar deleted the lynx_aim_tracked_bit_workaround branch January 15, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_candidate PR that should be part of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants