Web vr - no camera movement

I’m learning Babylon and would like to use it for a VR project. I made a test Codepen but my device (iPhone 8 Plus on Chrome and Safari) doesn’t pick up any movement (rotation).

Here is the pen:
(I have also downloaded and run the pen on my local setup, but still with the same result)

Can someone try it and maybe let me know if I missed something?


I think position change is new for WebXR cameras. The older VR only did rotation. Also, it requires that the device support, i think, emersive mode. This is either via a camera on the device, or pass through optics like Hololens & Magic Leap.

Rotation is also not working.
(Tested in Chrome)
(Thanks for fast reply!)

Apple updated safari to disable the orientation sensor by default. You should still be able to turn it on in settings. Ill add a sample how to prompt the user. See this issue: VR example for iphone after new sensor privacy change · Issue #6395 · BabylonJS/Babylon.js · GitHub

1 Like

I have enabled “Motion & Orientation Access” for Safari, but I’m still without result in Safari and Chrome. There is still no motion.

Are you on an https website? It looks like that is needed as well.

https made it work when I serve content from my server.
…but codepen example is still not working even it’s served from https.