Open comsyspro opened 2 years ago
Put the camera in a parent gameobject, and move around that in the scene instead. The gyro takes control of the camera local position, and rotation in VR mode.
Thanks @comsyspro for reaching out to us. And sorry for the long delay!
Following @Mandelbrow’s idea, and using the Hello Cardboard sample scene, putting the camera in a parent gameobject would look like this:
In this way, the position and rotation of the Main Camera is relative to the pose of Player.
You can test this by selecting Player and playing with the position and rotation in the inspector:
The Main Camera will be relative to the pose (position and rotation) of Player.
Please let us know if you need additional help with this. Thanks!
The app (360 degree image gallery) starts in 2D mode (magic window mode with gyrocontrol script). Then when you move around you can look in all directions (Input.gyro.attitude). But now when you enter the VR mode the camera is still at starting position without adapting the movments from 2D mode. Besides, when I move inside the VR mode and switch to the 2D mode then all is fine (the view was adapted). How can I set the VR camera rotation to the same perspective as in 2D mode when switching from 2D to VR mode?