Oculus Rift VR Support

This page describes how to use the Dialogue System in a VR environment.


Oculus Rift Example Scene

You can download an Oculus Rift example scene from the Dialogue System Extras page:

http://www.pixelcrushers.com/dialogue-system-extras

To run the example scene in Unity:

  1. Use Unity 5.1.2+.
  2. Follow the instructions on the Unity 5.1 VR Getting Started thread (http://forum.unity3d.com/threads/unity-5-1-vr-getting-started.332316/). This includes downloading and installing the Oculus Runtime for Windows.
  3. Download Oculus Utilities for Unity 5 from http://developer.oculus.com/downloads/.

Then play the example scene. The UI is spread across two world space canvases:

  • The dialogue panel is in actual world space next to Private Hart.
  • The alert panel is a child of the OVRPlayerController's CenterEyeAnchor so it always appears in front of the player.

The scene uses BasicLookInputModule. To select a dialogue option, look at it. Then click the mouse button ("Fire1") to select it.


Oculus Rift - Dialogue System Setup

In your own scenes, note the following:

  • Use Unity UI, not legacy Unity GUI.
  • To use look input as in the example scene, add the BasicLookInputModule script to your EventSystem.
  • Decide how you want your UI to appear in VR. The example scene presents two options: alerts are shown in the center of the player's vision regardless of where the player looks, and conversations occur on a panel in fixed world space.
  • You can use a different world space dialogue panel for each NPC by adding an Override Dialogue UI component to it.
  • You will usually want to set the Dialogue Manager's Default Sequence to Delay({{end}}) or None() instead of the default camera closeup sequence, since it can be very disorienting to take control of the player's camera in VR.

<< Third Party Support