To change the starting position of the virtual camera, you need to add the ZEDCamera as a child of a parent GameObject. The starting position will be located at (0,0,0) in World space.
![trinus vr head tracking trinus vr head tracking](https://i1.wp.com/www.trinusvirtualreality.com/wp-content/uploads/2018/11/daydream-1.jpg)
The ZEDCamera prefab is the easiest way to add positional tracking in a virtual environment. To use, simply drag and drop the prefab into your scene.īy adding the ZEDCamera as a father of Unity main camera, you will have direct control of the virtual camera pose by head tracking. Using ZED Prefab to move the virtual camera Make sure your ZED is connected, and that its line of sight is not obstructed. Run the demo scene, move your ZED around and watch the virtual camera reproduce the same movement in Unity. You can now launch the ZEDTrackingScene sample. To import the ZED package in Unity, you have to go in Assets → Import package → Custom package.Īfter selecting the ZEDCamera.unitypackage, make sure all the boxes are checked and then click Import.
![trinus vr head tracking trinus vr head tracking](https://pbs.twimg.com/media/DwpL_jjWwAIlsAi.jpg)
The scripts are used by the Prefab.Ĭontains sl_unitywrapper.dll, which enables C# scripts to communicate with the ZED SDK. The ZED package for Unity includes assets, scripts, and a sample scene to assist with development. The ZED package contains the following subdirectories:Ĭontains the main Unity prefab that is used to replace the regular Unity Camera within a scene: ZEDCamera.Ĭontains a sample scene illustrating the use of ZED motion tracking in Unity: ZEDTrackingScene.Ĭontains C# files that are used to interface the ZED and Unity components. In this tutorial you will learn how to track the movement of the ZED in Unity so that an identical virtual camera move can be reproduced in the game engine.
Trinus vr head tracking full#
By using the ZED as an add-on camera to a VR headset, desktop and mobile HMDs such as Gear VR can now track your position in space and offer great experiences with full freedom of movement.
![trinus vr head tracking trinus vr head tracking](https://i2.wp.com/www.trinusvirtualreality.com/wp-content/uploads/2018/12/deviceManagerIntelGraphics.jpg)
Positional tracking is what makes the HTC Vive and Oculus Rift so immersive.
Trinus vr head tracking how to#
How to Add Position and Head Tracking in Unity for VR