Getting Started
VRTK offers a VR Simulator that works without any third party SDK, but VR device support requires a supported VR SDK to be imported into the Unity project.
Using the example project & scenes
- Download or clone vrtk.
- Open the folder in Unity to load the project.
- Have a look at the included example scenes.
The example scenes support all the VRTK supported VR SDKs. To make use of VR devices (besides the included VR Simulator) import the needed third party VR SDK into the project.
Using VRTK in your own project
- Download or clone vrtk.
- Import the
Assets/VRTKfolder into your Unity project. - Add the
VRTK_SDKManagerscript to a GameObject in the scene.
The SDK Manager handles setting up everything to use the various supported SDKs via VRTK_SDKSetups. To use a VR SDK the following steps are needed:
- Download and import the SDK into the project.
- Create a new empty game object.
- Add
VRTK_SDKSetupto it. - Add the VR SDK's game objects (e.g. the Camera Rig) as children.
- On the SDK Setup set the
SDK Selectionto the respective VR SDK. - Make sure all the
Object Referencesare set correctly byAuto Populateor set them manually.
- Add
- On the SDK Manager under
Setupsadd a new slot and select the SDK Setup for that slot.
Repeat the steps above to add additional SDK Setups to the SDK Manager.
If the Auto Load setting on the SDK Manager is enabled the SDK Setups are automatically loaded in the order they appear in the list:
- The first Setup that is usable (i.e. initializable without errors and the HMD is connected) will be used.
- If a Setup can't be used the next one will be tried instead.
- If no Setup is usable VR support is disabled.
The SDK Manager allows switching the used SDK Setup at runtime. To add a simple overlay GUI to do so add the SDKSetupSwitcher prefab from VRTK/Prefabs to the scene.
Read the rest of this document for more detailed instructions on how to set up and use the supported VR SDKs.
VR Simulator
Instructions for using the VR Simulator
- Follow the initial steps above by adding the
VRSimulatorCameraRigprefab fromVRTK/Prefabsas a child of the SDK Setup game object. - Use the Left Alt to switch between mouse look and move a hand.
- Press Tab to switch between left/right hands.
- Hold Left Shift to change from translation to rotation for the hands.
- Hold Left Ctrl to switch between X/Y and X/Z axis.
- Additional button mappings can be found on
SDK_InputSimulatoron the prefab. - All button mappings can be remapped using the inspector on the prefab.
SteamVR
Instructions for using SteamVR
- Import the SteamVR 1.2.3 Plugin from GitHub.
- Follow the initial steps above by adding the
[CameraRig]prefab from the plugin as a child of the SDK Setup game object.
Oculus
Instructions for using Oculus Utilities
- Download the Oculus Utilities from the Oculus developer website.
- Import the
.unitypackage. - Follow the initial steps above by adding the
OVRCameraRigprefab from the Utilities as a child of the SDK Setup game object. - On the
OVRCameraRigin the scene find theOVRManagerand set itsTracking Origin TypetoFloor Level.
Ximmerse (experimental)
Instructions for using Ximmerse
- Download the Ximmerse Unity SDK from the Ximmerse SDK Github page.
- Import the
.unitypackage. - Follow the initial steps above by adding the
VRCameraRigprefab from the SDK as a child of the SDK Setup game object.- It is recommened to use
Floor Levelas theTracking Origin Type, with the position ofVRCameraRigset to(0f, 0f, 0f).Eye Levelcan also be used, in this case it is recommended to set the position to(0f, 1.675f, 0f). - Make sure
SimplePickeris not attached to any of the game objectscobra02-Landcobra02-R.SimplePickeris provided by the Ximmerse SDK but using the script may break VRTK's grab functionality.
- It is recommened to use
- Switch the build settings in
File > Build Settings...toAndroid.
Currently Ximmerse 6DOF tracking is only supported on Android. 3DOF tracking is supported on both iOS and Android. Ximmerse are getting MFI certification from Apple at the moment.
Daydream (experimental)
Instructions for using Daydream
- Open a new or existing project in Unity that offers Daydream integration.
- Download the Google VR SDK from the Google developer website.
- Import the
.unitypackage. - Switch the build settings in
File > Build Settings...toAndroid. - In
Edit > Project Settings > Playerset the following:- API Level to
Nougat. - Bundle Identifier and other settings for use with Android.
- API Level to
- In the
Hierarchywindow, create a new empty GameObject namedDaydreamCameraRig. - Add the following as children of
DaydreamCameraRig:- A new
Camera. - The
GvrControllerPointerprefab fromGoogleVR/Prefabs/UI. - The
GvrControllerMainprefab fromGoogleVR/Prefabs/Controller. - The
GvrViewerMainprefab fromGoogleVR/Prefabs(enables the view in editor play mode).
- A new
- Disable Daydream's native pointer tools by removing or disabling
DaydreamCameraRig/GvrControllerPointer/Laser. - Follow the initial steps above by adding the
DaydreamCameraRigobject as a child of the SDK Setup game object.
Note: Daydream supports only one controller, the left scripting alias controller of VRTK will not be used.
Updated less than a minute ago
