Using this playground
I’ve already tried this example in about two weeks ago and all were working fine but now it throws some error. Maybe it’s because of my last Chromium’s update.
I use chromium-browser: Version 112.0.5615.49 (Official Build) Built on Ubuntu
It shows me the error right after 1 second after I enter the VR-mode (Babylon’s icon at the right bottom of the screen).
Babylon.js v6.2.0 - WebGL2 - Parallel shader compilation
webxr-polyfill.js:3169 TypeError: Failed to construct 'PointerEvent': Failed to read the 'screenX' property from 'MouseEventInit': The provided double value is non-finite.
at e.simulatePointerMove (babylon.js?t=1683271423811:1:484044)
at t.simulatePointerMove (babylon.js?t=1683271423811:1:523563)
at c.callback (babylon.js?t=1683271423811:1:2872290)
at e.notifyObservers (babylon.js?t=1683271423811:1:67564)
at Object.renderFunction [as callback] (babylon.js?t=1683271423811:1:1802159)
at XRSession$1.<computed>.onDeviceFrame (webxr-polyfill.js:3166:28)
Looks the problem with Immersive VR emulator since webxr-polyfill.js is the ImmersiveWebEmulator’s script.
I’ll check that. Don’t remember seeing this issue before, might be a symptom of a general issue.
I can’t seem to reproduce this. I just tried it with chrome canary. Any specific playground that does it?
The playground is available in the first thread but I do not seem to be able to repro on my side
Wow, as for 6.3.0 I don’t see this problem too!
I can reply the same issue using the original playground, the last version of Chrome and Babylon 6.12.3
VM1422:1284 TypeError: Failed to construct ‘PointerEvent’: Failed to read the ‘screenX’ property from ‘MouseEventInit’: The provided double value is non-finite.
at e.simulatePointerMove (scene.inputManager.ts:347:21)
at t.simulatePointerMove (scene.ts:1937:28)
at e.callback (WebXRControllerPointerSelection.ts:630:29)
at e.notifyObservers (observable.ts:381:49)
at Object.renderFunction [as callback] (webXRSessionManager.ts:296:46)
at XRSession$1..onDeviceFrame (:1281:42)
That’s weird I can reproduce that on https://playground.babylonjs.com/#9K3MRA#1233 but not on others like https://playground.babylonjs.com/#9K3MRA#1234 that are “almost the same”
Edit: notice that if I comment out
xrHelper.input.xrCamera.setTransformationFromNonVRCamera(camera, true);
it works ok
Btw @RaananW what plugin are you using for debugging? I’m using WebXR for Chrome
It doesn’t fail using that emulator + Quest Pro but it fails with that one with Quest 2
i’ll try reproducing this again. Seems like NaN is generated somewhere.
same question with immersive-web-emulator 1.3.1 and chrome 115