-
Notifications
You must be signed in to change notification settings - Fork 2
Use VRTK with VR Tracker
VRTK stands for Virtual Reality Toolkit. As mentioned on their website it can be defined as follow : A productive VR Toolkit for rapidly building VR solutions in Unity3d.
VRTK is only for Unity, but compatible with most VR devices (Vive, Oculus, Daydream, Gear VR…) and simplify developing for multiple VR headsets. It is based on MIT License and all the code can be accessed from their Github.
Have a look at the Overview video to learn more about the features :
As you can see there is many things you can do with VRTK using very little coding ! When we wrote our own scripts to pickup and move objects we thought that it would take us lots of time to develop every new feature. Therefore we decided to rather integrate VR Tracker in VRTK, and the good part is that it was pretty easy after all !
That integration is now part of our Unity Example on Github, note that you shouldn’t import VRTK from their Git or the Asset Store as we modified it.
You can find some examples in VRTK/Examples. You might need to drop the SDKSetup prefab in [VRTK_SDK Manager] GameObject
Make sure that “SDK_VRTRACKER” is enabled. Hit “Auto Populate” in the [VRTK_SDK Manager]. VRTracker will be loaded by default, but you can also use the Simulator for example by hitting “Load“.
If you at the SDKSetups GameObject, you will find a child called VRTracker. It has a script attached named VRTK_SDK Setup. Here is an important part : you need to set the SDK Selection –> Quick Select to the device you will be exporting for.
An example of the Player prefab for VRTK can be found in VRTracker/Prefabs/VRTrackerPlayerVRTK
You can see that it doesn’t contains any camera, as it will be generated by VRTK when playing
Be careful to correctly set the “Tag Type” for each VR Tracker Tag script.
As usual, you can use the VR Tracker IntroAssignation scene to assign the Tags, and use the VRTK scene as the second scene to execute. The Build Settings scene order must be as follow, with the SandyBox scene replaced by any VRTK Example.
Currently the controllers in VRTK looks like our new controllers, but you might want directly start with something else, like a gun, a wand, anything that came to your mind ! Doing those changes is quite simple and already fully documented by VRTK team. I’ll leave you dive in their doc 😉