[WebXR] [Oculus Go] Reset View event handler


Is there a way to catch the Reset View event on the Oculus Go headset?

According to the link referenceSpace.onreset is the event I should handle: XRReferenceSpace: reset event - Web APIs | MDN

But it doesn’t work. Here is the sample: Babylon.js Playground

And these are the key lines in that sample:

const xrExperience = await scene.createDefaultXRExperienceAsync({
        floorMeshes: [ground],
        disableTeleportation: true,
        ignoreNativeCameraTransformation: true,
        useStablePlugins: true
xrExperience.baseExperience.sessionManager.onXRSessionInit.add((xrSession: XRSession) => {
    console.log(`+++++++ onXRSessionInit`);
        (refSpace) => {
            console.log(`+++++++ has local-floor`);
            refSpace.onreset = (_event: any) => console.log(`+++++++ local-floor onreset event handler`);
        () => {
            console.log(`+++++++ onreject`);

Unfortunately, when I reset the view by pressing the button on the controller, the reset event doesn’t invoke. So I can see only two lines in the log:

+++++++ onXRSessionInit
+++++++ has local-floor

What am I doing wrong?

Never thought about it! Good question :slight_smile:

Babylon itself has a onReferenceChanged observer in the Session manager, but i doubt it will be triggered here, as this is more for when the user changes the reference space, and not the device itself.

I don’t have an oculus go, so i sadly can’t check on GO, but the oculus quest should work the same If you want to add an issue on github (with investigation in its title), I will make sure to keep that in mind and check what can be done when I have the time.

Thank you for responding so quickly,
I made an issue, as you suggested.

1 Like