aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.69k stars 3.98k forks source link

Head pose tracks without entering a VR session (Safari for Vision Pro) #5446

Open dmarcos opened 9 months ago

dmarcos commented 9 months ago

Load example accept permissions prompt and will see camera tracking the headset orientation without even entering a VR session. I have not debugged yet but headset / device pose might be exposed via device motion / device orientation APIs? Meta Browser on Quest doesn't behave this way

https://github.com/aframevr/aframe/assets/39342/6d300c92-0bd3-48a3-99e0-71a6bd709b2b

dmarcos commented 9 months ago

For full context, A-Frame uses Device orientation events for Magic window mode on mobile devices. It looks like Vision Pro might be unique in that it exposes the headset orientation via DeviceOrientationEvent. Not sure if it's intentional on Vision Pro's side or behavior inherited unintendedly from Safari for iOS

dmarcos commented 9 months ago

I'm not sure if exposing headset orientation via DeviceOrientation events is the right way to go. I think at least behavior across browsers should be consistent to avoid different app logic dependent on userAgent.

cc @rcabanier @AdaRoseCannon because some coordination across browsers might be needed to resolve this