isHandTracking remaining false in AR session #207
-
I wanted to see if anyone had any suggestions for this before I formally submitted an issue. Basically it seems that react-xr is failing to set up hand tracking in AR sessions. Anyone else struggled with this? The isHandTracking state in useXR is remaining false for the AR session using hand-tracking whereas flipping over to a VR session works as it should. The XRInputSource property "hand" is still null in AR while it properly contains an XRHand object in VR. When using the same AR hand-tracking in raw three.js the XRHand object is present in the session.InputSources object as it should be. I'm using the latest Oculus browser to test this. To get as deep as I can with it: state is being set here: https://github.com/pmndrs/react-xr/blob/fdd3e54794d0171d75d9346c14a6b82a754353f0/src/XR.tsx#L134 perhaps cleanup is being triggered early somehow and removing the listener for "inputsourceschange": |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I've found that we can sometimes be too late to session init and three goes out of sync, where I eagerly call sessionstart handlers: https://github.com/pmndrs/react-xr/blob/43bdb9fba56d74b8176024618694f26b2aa3cf03/src/XR.tsx#L143-L144 I think I'd need to do the same for internal input handlers, but fixing this desync problem at its core would be ideal. |
Beta Was this translation helpful? Give feedback.
-
Fixed in #208. |
Beta Was this translation helpful? Give feedback.
Fixed in #208.