Skip to content
Zach Kinstner edited this page Feb 11, 2015 · 34 revisions

Overview

This document will walk through the process of adding Hovercast to your project. The integration process is summarized by the following steps:

  1. Attach Hovercast to the scene.
  2. Create the menu hierarchy, items, and actions.
  3. Add optional customizations for the entire menu and individual items.
  4. Link your navigation, customization, and input providers to Hovercast.

These instructions and examples are based on the "LeapVR" demo scene. This particular scene (in Unity 3D) uses Oculus Rift cameras and Leap Motion input. See the other demo scenes for variations.


1. Attach Hovercast

Hovercast's main script is called HovercastSetup. This script is responsible for generating and updating the menu. The first step is to attach it to the scene correctly.

When using Leap Motion input, HovercastSetup must be attached as a child of Leap Motion's "HandController" object. In general, HovercastSetup needs to be in the same coordinate system as the 3D input. This keeps Hovercast anchored in the correct position and orientation, allowing the menu's graphics to stay aligned with the 3D input.

HovercastSetup is a child of HandController

The "Hovercast" object is a child of "HandController", and contains a HovercastSetup script.


2. Create Menu Items

Hovercast supports a nested hierarchy of menu items, which you can create directly within the Unity editor. Starting with one object as the menu's "root", add one child object for each menu item. Each of these items can also have child objects.

Menu Hierarchy

The full demo menu hierarchy, as seen in the demo video.

Add Details

Each object in this hierarchy must have a HovercastNavItem script attached to it. This script provides several editor fields, where you can enter the menu item's details. See "Types of Menu Items" for more >

Add Listeners

To handle an item's events and actions, you'll need to create a custom script. This script must inherit from HovercastNavItemListener, which provides the structure required to create the listener. See "Menu Item Listeners" for more >


3. Add Customizations

Hovercast comes with a set of default renderers, which are responsible for drawing various aspects of the menu. These renderers offer a variety of settings for customization. Hovercast also provides interaction-related settings.

As a starting point, every Hovercast integration must include an object with the HovercastCustomizationProvider script attached. When used on its own, this script will use Hovercast's default renderers and settings.

There are four customization scripts available:

These customization scripts must be attached to the same object that contains the HovercastCustomizationProvider script. The values provided in these scripts will override Hovercast's default settings.

Customization Provider and settings

The settings used by the demo.


4. Set Provider References

...

Clone this wiki locally