Hi,
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`);
xrSession.requestReferenceSpace("local-floor").then(
(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?