pmndrs / react-xr

🤳 VR/AR with react-three-fiber
https://npmjs.com/@react-three/xr
MIT License
1.98k stars 137 forks source link

XR Controllers disappear when using conditional rendering #291

Open netgfx opened 11 months ago

netgfx commented 11 months ago

Hello, I have this example https://codesandbox.io/s/react-xr-simple-demo-with-swap-6l8xzd?file=/src/index.tsx where I'm making a sphere geometry appear when a button is clicked via react conditional rendering. This action is making the Controllers (Oculus quest 2) disappear, although moving them around and squeezing will emit events and interact, I believe only the 3D models aren't visible.

If the session is somehow restarted (taking off the headset and on again) will make the Controllers appear again.

Not sure if this is a known issue or if my implementation is somehow faulted.

netgfx commented 11 months ago

narrowing it down, it seems that when the useLoader or useTexture is used (even if the result doesn't get used) the Controllers are disappearing.

CodyJasonBennett commented 11 months ago

Is this still an issue with v5.6.2?

netgfx commented 11 months ago

@CodyJasonBennett I'll check out on headset tonight and report back. Thanks for the effort!

eigilnikolajsen commented 10 months ago

I'm still having this issue in version 5.7.0 When previewing in Meta Quest Browser the controllers dissappear when loading a video texture. If I exit and reenter the VR experience the controllers show up again.

chriskch commented 7 months ago

Are there any news on that?

CodyJasonBennett commented 5 months ago

From Discord, looks like state is not being created correctly when XR remounts.

MirkoCzo commented 3 months ago

From Discord, looks like state is not being created correctly when XR remounts.

Hi, is there any way around this problem?

MP242 commented 4 days ago

Hello! Is the problem still unresolved?