Skip to content

Gaze selector in VR #242

Answered by bbohlender
vincentdchn asked this question in Q&A
Feb 16, 2023 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

You can build such a thing yourself, using the pointer-events system implemented in react-three/xr v6. Take a look at how the DefaultXRInputSourceRayPointer is implemented and use this information to build a ray pointer that is placed at the camera.

To retrieve the transformation of the camera follow this tutorial.

This all said, most AR / VR platforms (Meta Quest headsets) already automatically add a XRInputSource inside the viewers head position in case no controllers and hands are detected, which is already used by react-three/xr v6.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@vincentdchn
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by bbohlender
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants