I have an issue with Unity and the asset sample AR+VR.
This is about the camera rotation inside VR view.
Here is what I got :
1) I am in AR view and I go to the VR view.
2) Now I am in VR view and the camera rotation is (0,0,0)
3) Then I rotate the camera to (0,-59,0) for example and I go back to AR view.
4) Inside AR view, I go again to the VR view
5) The problem is here ! Now my camera rotation is (0,-118,0) when I am inside the view VR.
What I need is to have the camera rotation at (0,0,0) as point 2).
- In the scene hierarchy, the camera transform is in UserHead > ARCamera.
- This camera only moves during VR mode.
- When go to AR Mode, the camera rotation keeps his last rotation.
- In VR mode, the camera rotation can't be changed manually inside the Inspector. The rotation is controlled by the VuforiaBehaviour script attached on the camera.
Have you any tips or solution to reset the camera rotation when I go to the VR View ?
Tested with Vuforia 8.0.10
What I have tried without success:
1) Force reset rotation of the camera but Vuforia always reapply his saved rotation.
I didn't find where Vuforia do this change.
2) Use the RecenterPose function ( https://library.vuforia.com/content/vuforia-library/en/reference/unity/classVuforia_1_1RotationalDeviceTracker.html )
I called the function in TransitionManager.cs after the line 101 ( MixedRealityController.Instance.SetMode(this.currentMode); )
3) Restart the scene.
Only works if I restart inside AR mode. But I don't like this workaround.
Thank you for your help !