Thanks to some help on previous questions in this forum I was able to get a Babylon (preview) scene working in WebXR on Chrome Canary in the Rift. Awesome, yes…but of course I’m always going to want more.
I totally understand that WebXR is a moving target right now, but I’m also seeing some older posts from this year with Babylon scenes working on the Quest.
Is this because those folks targeted WebVR with an older version of Babylon? If so, is it possible to swap out the default XR helper I’m using with an older VR helper (maybe using the same Babylon v4.1.0 a13)?
Ultimately, which is out of date? Is it that Babylon isn’t targeting the same WebXR as the Quest (both stock browser and FF Reality)? Or is it that those browsers are still on WebVR?
Despite all the questions, I’m psyched I can do this at all right now, anywhere - so THANKS!
Without digging too much, it seems to me like the browsers are not catching up. In this article - Firefox Reality for Oculus Quest , firefox are saying that they are planning a WebXR rollout in “a few months” (the paragraph before last), so I assume the browser still supports the “older” WebVR specs. And Stock browsers are never truly updated.
I dont have a quest, so I can’t really test that, but a quick check will be to use an older stable version of Babylon (like the latest 3.x) and see if it works. If it does, it’s the browsers who implemented older specs. If it doesn’t, it must be us.
That’d be great - esp if I can use the same Babylon version and just set a flag in my code to switch off. I’ll check it out now that I have a bit of confidence it’ll work.
If it doesn’t I’ll try rolling back to 3.x as RaananW says.
Thanks both!
Just to contribute back if anyone is wondering - I have both WebXR and VR working - I check XR first, and if that mode isn’t available, I start the VR helper.
// Check XR support
const xrHelper = await scene.createDefaultXRExperienceAsync({floorMeshes: [environment.ground]});
if(!await xrHelper.baseExperience.sessionManager.supportsSessionAsync("immersive-vr")){
// do WebVR instead
const vrHelper = scene.createDefaultVRExperience();
vrHelper.enableInteractions();
} else {
// do some WebXR stuff
Just wanted to update regarding webXR and the oculus quest
The oculus quest browser does support webXR (if turned on) BUT!! a very old version. The “hack” to make it work (somehow) is to add this code to your main .js file (warning, global namespace manipulations!)
As you can see, most (if not all) of the webxr functions in the oculus browser (current version of the browser, i must say) have a different signature than what it is supposed to be. AND, the only mode it supports is identity (which is not even documented on MDN).
So, long story short - i wouldn’t try using webxr on the oculus quest, until they update their browser with the newest API. then there is no reason for it to not work.
Awesome, thanks again! This is all perfect timing, I had a POC before that I was working on when I initially asked this question. Now I’m formalizing it a bit and redoing - so this latest advice will definitely influence