Closed sebastianwahn closed 5 years ago
@sebastianwahn Did you enable orientation in Safari for IOS ???
By default now Safari does not authorize it anymore: https://doc.babylonjs.com/how_to/webvr_helper#detect-if-fallback-orientation-camera-is-supported
@sebavan yes, I tested this on my iPhone with 12.3.x installed and orientation toggled on. With the 4.0.3 (stable) version the movement of the camera in VR mode is tracked properly.
Ok so it is expected. We turn on the gaze on the VRExperienceHelper when there is no controller and no pointer (that we detect with pointerLock...which unfortunately is not supported on iOS).
You can turn off gaze by not calling vrHelper.enableInteractions().
Is it an option? Other option would be to add a boolean for you that will let the system ignore the pointerLock restriction
@deltakosh why is this behavior expected? With the same device and iOS the feature does work in 4.0.3 and does not work in 4.1.0
Or did you refactor the onPointerObservable
in a way that the gaze tracking is not a pointer event anymore?
If yes, is there an alternativ observable I can listen to, to receive a pointerInfo object when I'm in VR mode with a mobile device?
With the same device and iOS the feature does work in 4.0.3 and does not work in 4.1.0:
Because we added the test for pointerLock for 4.1
I went ahead and added a new property for you that you can turn on now: vrHrlper.enableGazeEvenWhenNoPointerLock = true
@deltakosh is this already included in the alpha build for me to test?
It is on nightly (on the repo) and I will push a npm update today :)
thanks!
Bug
Using:
differs between stable and latest babylon, when using a mobile device in VR mode. tested in iOS 12.1 & 12.3 in safari
Switch between latest & stable on a iOS safari. Maybe also a problem on other mobile devices.
Expected result: Using
scene.onPointerObservable
works in both versions the same way for mobile devices. In the example above, in both versions the color of the sphere changes in VR mode while rotating/moving the device.Current result: When using
scene.onPointerObservable
in latest on a mobile device (safari iOS) in VR mode, the observable is not triggered, resulting in not changing the color of the sphere. Although, when doing a swipe gesture while in VR mode the observable is triggered.