Skip to content

Input Modules꞉ Vive

Zach Kinstner edited this page Dec 20, 2016 · 6 revisions

This module converts various positions on the Vive controllers into cursors. The module's main component provides properties to configure the local offsets (relative to the controller) that determine the cursor positions.

Cursors

Vive Cursors 📷 Default cursor positions for the Vive controllers

This animation shows all the available cursors enabled simultaneously. A more common usage would be to enable only one or two cursors per controller. The "Pinky" cursors, which are placed on the "inside edge" of both controllers, are pre-configured for use with the Hovercast interface.

SDK

This input module is compatible with the SteamVR SDK.

Scene

The input module scene is named HoverInputModule-Vive, located in the /Assets/Hover/InputModules/Vive/Scenes folder.

Installation

See the Input Modules page for details about loading input module scenes and defining symbols. To install this input module via its pre-built scene:

  1. Attach the HoverSceneLoader component to an object.
    1. For the "Scene Folder Path" and "Scene Name" properties, replace the "NAME" placeholder text with "Vive".
    2. To load the scene before runtime, click the "Reload Scene" button.
  2. Define the HOVER_INPUT_VIVE symbol.

To install this module manually:

  1. Add the [CameraRig] prefab to the scene.
  2. Attach the HoverInputVive component to the prefab's root object.
  3. Define the HOVER_INPUT_VIVE symbol.

Input Component

Vive Component 📷 The HoverInputVive component, with per-cursor properties

  • The "Cursor Data Provider" property will automatically attempt to find the HoverCursorDataProvider component (in the HoverKit prefab).
  • The "Steam Controllers" and "Look Cursor Transform" properties will be set automatically.
  • The per-cursor properties (like "Left Palm" and "Right Index") are pre-configured with default values.

The following properties can be set independently for each cursor:

Property Description
Local Position/Rotation Applied to the cursor as local offsets from the controller center.
Trigger Strength Input The axis/button that controls the cursor's "Trigger Strength".
Cursor Size Input The axis/button that controls the cursor's "Size".
Min/Max Size The cursor's size boundaries. By default, the cursor is sized via the midpoint between these two values.

The two "Input" properties allow the following selections:

Option Description
None Ignores input, defaults to 0% (trigger strength) or 50% (cursor size).
Trigger Uses the trigger's linear value.
Touchpad Y Uses the touchpad's linear value from down to up.
Touchpad Up Uses the touchpad's linear value from center to up.
Touchpad Down Uses the touchpad's linear value from center to down.
Touchpad X Uses the touchpad's linear value from left to right.
Touchpad Left Uses the touchpad's linear value from center to left.
Touchpad Right Uses the touchpad's linear value from center to right.
Touchpad Touch Uses the touchpad "touch" state's boolean value.
Touchpad Press Uses the touchpad "press" state's boolean value.
Grip Press Uses the grip (on the controller sides) button's boolean value.
Menu Press Uses the menu (above the touchpad) button's boolean value.

Raycast Cursors

Vive Raycasts 📷 All cursors set to "Is Raycast" mode

This animation shows all the available cursors projecting raycast lines. Typically, a scene the requires raycast functionality would enable only one cursor per controller.

Clone this wiki locally