Search code examples
c#androidunity-game-enginegoogle-cardboardvirtual-reality

unity cardboard camera rendering around object


I'm using unity 5.2.2 for this project and CardboardMain prefab. I want to rotate and spin around an object such as the mask example from google cardboard app. As far as I know there are two ways of doing this: 1. Render the CardboardMain (parent of the Head) 2. Render the main object.

I'm new to this technology. Would you please help me with C# or JavaScript code and instruction how to do this.

Thank you.


Solution

  • Put the CardboardMain object at the same location as the object you are viewing. Set the Z component of the Main Camera (child of CardboardHead) to a negative value. You can do this in the editor.