WebXR Camera Not Working (Fully) in Any Babylon.js WebXR Playground or Project in Oculus Browser

Hello!
Yesterday morning I was working on a Babylonjs WebXR project and testing it on the Oculus Browser with a Quest 2 headset, with no problems at all. Everything was working fine. Then last night I went back into VR mode in the same project, and only the right lens camera was working (not exactly sure how to word that, but it was no longer “stereoscopic”). I also viewed other projects and Playgrounds I had set up, and the same problem occurred. I wondered if something had changed in the WebXR API across all WebXR projects on the Internet, but no, projects done in other applications were still working well. When I checked out the Babylonjs WebXR Playground examples page, however, only the right lens camera works for all of the examples. So it seems to be a Babylonjs problem only? Or maybe it has to do with my headset, which is fully updated.

This is just a quick set of links for an example page Playground and one of my own Playgrounds:
:https://doc.babylonjs.com/divingDeeper/webXR/webXRDemos
https://playground.babylonjs.com/#JA1ND3#161
https://www.babylonjs-playground.com/#FGI273#154

I did introduce a small change yesterday, and we did make a few changes in the way we clear the scene in WebXR.

Let me check that and see if we haven’t broke anything. Thanks for reporting!!

Wow, that was a fast answer!

1 Like

Reproduced! let’s fix that. i’ll push a nightly with a fix when I am done

1 Like

Great, thanks! I thought I broke my headset somehow…

No, apparently I did…

Here is the fix - [XR] clear depth for utility layer by RaananW · Pull Request #11796 · BabylonJS/Babylon.js (github.com) , I’ll merge it once the tests pass.

3 Likes

Should be good to go! please try and let me know :slight_smile:

1 Like

Excellent! :grin: Unfortunately I’m far from my headset right now, and will be for about six hours. As soon as I get home, though, I’ll enter the WebXR world straight away. Thanks for your hard work and prompt attention to the bug! :beetle:

1 Like

I tried the same examples/Playgrounds, but the same problem persists. Is there something I need to do differently on my end? There’s still no left lens camera for any of the Babylon JS content. Does it work correctly for you?

I reloaded all of the web pages, too, several times. I haven’t tried clearing the browser cache yet. I’ll try it now.

Yes, I cleared the cache, and it works beautifully! Thanks again!

5 Likes