Be the first to like this
Source code and assets: https://zenva.com/UniteIndia2018 In Unity, a camera is a device that captures and displays the game world to the user. But the way you work with cameras in VR is different to that of normal 3D games and applications, so that is the first thing I want to address.
In a non-VR game you view the game world through the screen of your computer, if the player moves and/or rotates the computer, the content of the screen doesn't change.
If they want to look around in such a game, they have to use the mouse or keyboard to rotate the camera. Also, there will be times when they are not in control, for example in a cut scene, where the camera might show the action from different angles.
VR apps work differently. The game world is seen through your HMD. The user can look around, which will in turn rotate or translate the camera in the virtual world. The rotation of the camera is read directly from the headset. If you have say a dialog between two characters, in a non-VR game you can show the character who is talking. On a VR experience it's up to the player where they want to look at.
In real life it would be quite invasive if someone forced your head to look at a certain direction. The same applies to VR. If you try to force a camera rotation onto your users they will most likely abandon your app instantly.
The same thing applies for hand-controllers This brings us to the concept of XR camera rig, which is how we represent the user in VR
Think of the camera rig as the body of the player. In real life if you hop on a vehicle, the vehicle moves your whole body, it doesn’t move your head or your hands. If the vehicle rotates, it will rotate your whole body.
That is the approach we take when we are developing for VR and AR
What we’ll do now is go to Unity so that I can show you how you can get started