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.
- Download or clone this repository.
- 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.
- Download or clone this repository.
- Import the
Assets/VRTK
folder into your Unity project. - Add the
VRTK_SDKManager
script to a GameObject in the scene.
The SDK Manager handles setting up everything to use the various supported SDKs via VRTK_SDKSetup
s. 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_SDKSetup
to it. - Add the VR SDK's game objects (e.g. the Camera Rig) as children.
- On the SDK Setup set the
SDK Selection
to the respective VR SDK. - Make sure all the
Object References
are set correctly byAuto Populate
or set them manually.
- Add
- On the SDK Manager under
Setups
add 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.
**Instructions for using the VR Simulator**
- Follow the initial steps above by adding the
VRSimulatorCameraRig
prefab fromVRTK/Prefabs
as 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_InputSimulator
on the prefab. - All button mappings can be remapped using the inspector on the prefab.
**Instructions for using SteamVR**
- Import the SteamVR Plugin from the Unity Asset Store.
- Follow the initial steps above by adding the
[CameraRig]
prefab from the plugin as a child of the SDK Setup game object.
**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
OVRCameraRig
prefab from the Utilities as a child of the SDK Setup game object. - On the
OVRCameraRig
in the scene find theOVRManager
and set itsTracking Origin Type
toFloor Level
.
**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
VRCameraRig
prefab from the SDK as a child of the SDK Setup game object.- It is recommened to use
Floor Level
as theTracking Origin Type
, with the position ofVRCameraRig
set to(0f, 0f, 0f)
.Eye Level
can also be used, in this case it is recommended to set the position to(0f, 1.675f, 0f)
. - Make sure
SimplePicker
is not attached to any of the game objectscobra02-L
andcobra02-R
.SimplePicker
is 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.
**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 > Player
set the following:- API Level to
Nougat
. - Bundle Identifier and other settings for use with Android.
- API Level to
- In the
Hierarchy
window, create a new empty GameObject namedDaydreamCameraRig
. - Add the following as children of
DaydreamCameraRig
:- A new
Camera
. - The
GvrControllerPointer
prefab fromGoogleVR/Prefabs/UI
. - The
GvrControllerMain
prefab fromGoogleVR/Prefabs/Controller
. - The
GvrViewerMain
prefab 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
DaydreamCameraRig
object 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.