pmndrs / xr

šŸ¤³ VR/AR for react-three-fiber

Home Page:https://pmndrs.github.io/xr/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XR Controllers disappear when using conditional rendering

netgfx opened this issue Ā· comments

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.

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.

Is this still an issue with v5.6.2?

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

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.

Are there any news on that?

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

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

Hi, is there any way around this problem?

Hello! Is the problem still unresolved?

@MP242 @MirkoCzo @chriskch @eigilnikolajsen should be resolved in v6. Feel free to reopen if something doesnt work.
Since you probably need to migrate from v5, here's the migration guide.