react-xr
react-xr copied to clipboard
Hands don't show up in AR
using <ARButton /> the hands will work as controllers, emitting a ray, but the hand geometry is not displayed.
@MateSteinforth can you say what device you're using? This might be related to https://github.com/pmndrs/react-xr/issues/213
This is another symptom of #219 . Without isHandtracking setting to true the hand models are not displayed.
I missed this and #219. Taking a look.
I had the same issue too. After several hours of searching, I found that was because the hand-tracking feature is not enabled in AR mode using the default <ARButton />
(at least for my case). After I used the customized <XRButton />
with the hand-tracking enabled in the optional features, the hand-tracking works well in AR!
<XRButton
mode={'AR'}
sessionInit={{ optionalFeatures: ['hand-tracking', ...] }}
>
</XRButton>
It would be nice to add this to the documentation for people who want to enable hand-tracking in AR.
Huh. @wtong2017 I'm confirming that this is somehow related to the default AR/VR button.
Here is an example using a custom AR/VR button: xr-next-starter.vercel.app
Here's is an example with both standard AR & VR buttons shown: ekc8wh.csb.app
The first shows hands and sets isHandtracking in AR, the second only in VR. Another clue to this bug is that the button that works in AR breaks the VR mode. @CodyJasonBennett you had thought initially this might be the session init getting out of sync with three.js but it might just be the button!
I confirm the fix described by @wtong2017 worked for me as well. Thank you!
Hand tracking is now requested as an optional feature by default, so explicitly writing it as an optional/required feature is not necessary anymore. Feel free to reopen if something doesnt work. Since you probably need to migrate from v5, here's the migration guide.