How to LookAt things when using Google Cardboard SDK?
When GvrViewer is in the scene, the main camera is split into Left eye and Right eye. After this, moving around the main camera doesn't work anymore. In my game, I have both VR and normal mode but when in normal mode, I want to be able to use camera.main.transform.LookAt. However, it doesn't work because the camera is still split into eye cameras and moving the main camera has no effect - even though the VR mode is deactivated in GvrViewer.
How do I LookAt when GvrViewer is in the scene?
Answer by herra_lehtiniemi · Feb 13, 2017 at 06:37 PM
For those looking for an answer, I don't know if this is the correct way to do it, but it works anyway.
When running your game, Google VR adds a GvrHead-script to your main camera. This head assumably controls the camera movement, but even if you have disabled the VR mode in GvrView, the GvrHead-script prevents the camera from moving normally (for example rotating).
What I did was put a reference to the default 3D-camera (not VR camera) and when disabling VR mode, I also deactivate this script on my default camera. This releases the camera so LookAt starts working again and camera is free to rotate.
Your answer
Follow this Question
Related Questions
[VR][VIVE] allow rotation only ? 4 Answers
Google VR SDK for Unity Compiler errors 2 Answers
Camera Moving Dependless On World Axis 1 Answer
Google Carboard Compiler Error On Load 3 Answers