![]() The same thing applies for hand controllers. This is called an XR rig.Īs discussed earlier, we can’t force the rotation or position of the player’s head. The first thing we want is to create a containing object for our VR camera and controllers. We’ll build our setup from scratch with just the essentials. Then add just a directional light, a camera and a plane. Start by deleting all the game objects you see in the inspector. The template will also include a script we’ll be using. This will allow us to utilize the new Lightweight Render Pipeline, which provides better performance for VR applications. Now that we’ve covered how the workings of the camera is different in VR and non-VR application, let’s go to Unity and create a basic setup for VR.Ĭreate a new project using the template VR Lightweight RP (Preview). If you try to force a camera rotation onto your users they will most likely abandon your app instantly. In real life, it would be quite invasive if someone forced your head to look at a certain direction. On a VR experience, it’s always up to the player where they want to look at. The rotation of the camera is read directly from the headset. The player can look around, which will, in turn, rotate or translate the camera in the virtual world. The game world is seen through your headset or HMD. 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. If they want to look around in such a game, they’ll have to use the mouse or keyboard to rotate the camera. So if the player moves and/or rotates the computer, the content of the screen doesn’t change. In a non-VR game, you view the game world through the screen of your computer. The way you work with cameras in VR is different to that of normal 3D games and applications, so that is the first thing we will address here. In Unity, a camera is a device that captures and displays the game world to the user. The camera in VR vs non-VR applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |