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

Cursor component: improve xrselect rayOrigin logic #5606

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Nov 14, 2024

Description:
Continuation of #5528 adding logic to convert the XRPose coming from WebXR into world space. Intended usage of cursor="rayOrigin: xrselect" is to place it on the a-scene (similar to rayOrigin: mouse), but can also be placed elsewhere as the logic no longer depends on the entity it is on.

Changes proposed:

  • Add and remove WebXR event listeners when changing rayOrigin type to/from xrselect and when entering/leaving XR
  • Convert the WebXR pose to world space accounting for any camera rig
  • Handle the case no pose is available (before tracking is established or when temporarily lost)
  • Fixed a bug where a selectend from a different input source would incorrectly reset the activeXRInput freezing the active input source.

@dmarcos
Copy link
Member

dmarcos commented Nov 15, 2024

Thank you!

@dmarcos dmarcos merged commit 655ab16 into aframevr:master Nov 15, 2024
3 checks passed
@dmarcos
Copy link
Member

dmarcos commented Nov 16, 2024

Tested this on Vision Pro and seems to work as expected. Thanks

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.

3 participants