react-xr icon indicating copy to clipboard operation
react-xr copied to clipboard

Hands don't show up in AR

Open MateSteinforth opened this issue 2 years ago • 6 comments

using <ARButton /> the hands will work as controllers, emitting a ray, but the hand geometry is not displayed.

MateSteinforth avatar Dec 30 '22 01:12 MateSteinforth

@MateSteinforth can you say what device you're using? This might be related to https://github.com/pmndrs/react-xr/issues/213

saitonakamura avatar Jan 16 '23 16:01 saitonakamura

This is another symptom of #219 . Without isHandtracking setting to true the hand models are not displayed.

rekliner avatar Jan 23 '23 16:01 rekliner

I missed this and #219. Taking a look.

CodyJasonBennett avatar Jan 23 '23 17:01 CodyJasonBennett

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.

wtong2017 avatar Mar 16 '23 13:03 wtong2017

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!

rekliner avatar Mar 17 '23 06:03 rekliner

I confirm the fix described by @wtong2017 worked for me as well. Thank you!

apendua avatar Jan 04 '24 13:01 apendua

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.

bbohlender avatar Jul 17 '24 08:07 bbohlender