/VRTK

A productive VR Toolkit for rapidly building VR solutions in Unity3d.

Primary LanguageC#MIT LicenseMIT

vrtk logo

VRTK - Virtual Reality Toolkit

A productive VR Toolkit for rapidly building VR solutions in Unity3d.

Slack Waffle

Supported SDK Download Link
VR Simulator Included
SteamVR Unity Asset SteamVR Plugin
Oculus Utilities Unity Package Oculus Utilities

Documentation

The documentation for the project can be found within this repository in DOCUMENTATION.md which includes the up to date documentation for this GitHub repository.

Alternatively, the stable versions of the documentation can be viewed online at http://docs.vrtk.io.

Getting Started

VRTK requires a supported VR SDK to be imported into your Unity3d Project.

  • Clone this repository git clone https://github.com/thestonefox/VRTK.git.
  • Open VRTK within Unity3d.
  • Add the VRTK_SDKManager script to a GameObject in the scene.
**Instructions for using the VR Simulator**
  • Drag the VRSimulatorCameraRig prefab from the VRTK/Prefabs into the scene.
  • Select the GameObject with the VRTK_SDKManager script attached to it.
  • Select Simulator for each of the SDK Choices.
  • Click the Auto Populate Linked Objects button to find the relevant Linked Objects.
  • 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 Crtl to switch between X/Y and X/Z axis.
  • All above keys can be remapped using the inspector on the VRSimulatorCameraRig prefab.
  • Button mapping for the VR control are as follows:
  • Grip: Left mouse button
  • Trigger: Right mouse button
  • Touchpad Press: Q
  • Button One: E
  • Button Two: R
**Instructions for using the SteamVR Unity3d asset**
  • Import the SteamVR Plugin from the Unity Asset Store.
  • Drag the [CameraRig] prefab from the SteamVR plugin into the scene.
  • Check that Virtual Reality Supported is ticked in the Edit -> Project Settings -> Player menu.
  • Ensure that OpenVR is added in the Virtual Reality SDKs list in the Edit -> Project Settings -> Player menu.
  • Select the GameObject with the VRTK_SDKManager script attached to it.
  • Select Steam VR for each of the SDK Choices.
  • Click the Auto Populate Linked Objects button to find the relevant Linked Objects.
  • Optionally, browse the Examples scenes for example usage of the scripts.
**Instructions for using the Oculus Utilities Unity3d package**
  • Download the Oculus Utilities from the Oculus developer website.
  • Import the OculusUtilities.unitypackage into the project.
  • Drag the OVRCameraRig prefab from the Oculus package into the scene.
  • Check that Virtual Reality Supported is ticked in the Edit -> Project Settings -> Player menu.
  • Ensure that Oculus is added in the Virtual Reality SDKs list in the Edit -> Project Settings -> Player menu.
  • Select the GameObject with the VRTK_SDKManager script attached to it.
  • Select Oculus VR for each of the SDK Choices.
  • Click the Auto Populate Linked Objects button to find the relevant Linked Objects.

What's In The Box

VRTK is a collection of useful scripts and concepts to aid building VR solutions rapidly and easily in Unity3d 5+.

It covers a number of common solutions such as:

  • Locomotion within virtual space.
  • Interactions like touching, grabbing and using objects
  • Interacting with Unity3d UI elements through pointers or touch.
  • Body physics within virtual space.
  • 2D and 3D controls like buttons, levers, doors, drawers, etc.
  • And much more...

Examples

A collection of example scenes have been created to aid with understanding the different aspects of VRTK.

A list of the examples can be viewed in EXAMPLES.md which includes an up to date list of examples showcasing the features of VRTK.

The examples have all been built to work with the SteamVR Plugin by default, but they can be converted over to using the Oculus Utilities package by following the instructions for using the Oculus Utilities package above.

If the examples are not working on first load, click the [VRTK] GameObject in the scene hierarchy to ensure the SDK Manager editor script successfully sets up the project and scene.

Made With VRTK

image image image image image image image image image image image image

Many games and experiences have already been made with VRTK.

Check out the Made With VRTK Document to see the full list.

Contributing

I would love to get contributions from you! Follow the instructions below on how to make pull requests.

For the full contribution guidelines see the Contribution Document.

Pull requests

  1. Fork the project, clone your fork, and configure the remotes.
  2. Create a new topic branch (from master) to contain your feature, chore, or fix.
  3. Commit your changes in logical units.
  4. Make sure all the example scenes are still working.
  5. Push your topic branch up to your fork.
  6. Open a Pull Request with a clear title and description.

License

Code released under the MIT License.