VRExperienceHelper is not optimal for a phone experience

I’m trying to recreate a panorama viewer.

I’ve got the photodome up and running without any problems.

And I’ve added the VRExperienceHelper, so that a user can look at the photo dome in a GearVR / Cardboard.

Now I have a couple of bugs that I could use some help with :slight_smile:

1. Snap back to device orientation.
On my iphone, if I move the photodome using my finger, as soon as there is a device orientation change event is snaps back.

I would like it to continue with the device orientation I release my finger, and from the position that I was, not at the position the device orientation still was at.

Maybe we could fix it by sharing the rotation between the mouse input manager and the device orientation manager?

also the device orientation manager, should only be active when there are no fingers on the screen.

2. iOS doesn’t support fullscreen mode
When I click the googles in the corner, I go into stereo view, but the googles stay, and I cannot exit the stereo view.

for 2: this is an iOS constraint. They simply do not support fullscreen :slight_smile:

for 1: @trevordev has just release an update to stop using touch events when in device orientation mode. He can comment further

For 1: The PR I made yesterday is here: disable mouse interaction on orientation camera if sensor is active by TrevorDev · Pull Request #6042 · BabylonJS/Babylon.js · GitHub it disables interaction with the camera if the sensor is activated and touch is only a fallback. Does this seem expected to you or is the behavior you described above required?

1 Like
  1. But we should have a workaround so that the experience isn’t broken.
    At the moment we get stuck in limbo between full screen and normal mode.

We should probably still activate stereo mode, but have a way to exit stereo mode.

I think it should be the other way around.
Touch should override.

Say you are sitting at your desk and you are looking around using the sensor.
Now you want to look the other way. You shouldn’t have to stand up and turn around. You should be able to swipe to rotate the other way, but then be able to continue using the sensor

For the full screen issue, could you check if it’s ios and add an html button to exit or an error msg?

For the touch, I’ll see if I can find a way to support this,

PG with option: https://playground.babylonjs.com/#CGQ5QL#1

Thanks for the quick fix :cake:
I’m going to do some more testing regards fullscreen and get back to you when I’ve got some more feedback.