Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XR Controllers disappear when using conditional rendering #291

Open
netgfx opened this issue Jul 19, 2023 · 7 comments
Open

XR Controllers disappear when using conditional rendering #291

netgfx opened this issue Jul 19, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@netgfx
Copy link

netgfx commented Jul 19, 2023

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
Copy link
Author

netgfx commented Jul 19, 2023

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 CodyJasonBennett added the bug Something isn't working label Jul 19, 2023
@CodyJasonBennett
Copy link
Member

Is this still an issue with v5.6.2?

@netgfx
Copy link
Author

netgfx commented Jul 26, 2023

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

@eigilnikolajsen
Copy link

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
Copy link

Are there any news on that?

@CodyJasonBennett
Copy link
Member

CodyJasonBennett commented Jan 10, 2024

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

@MirkoCzo
Copy link

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

Hi, is there any way around this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants