Input Module Manager

Introduction

Please refer to WaveVR API Level for API compatibility.

Unity provides Event System to receive input from standard I/O and communicate among different Game Objects.

WaveVR provides a prefab InputModuleManager with the script WaveVR_InputModuleManager to use Event System easily.

Note: Prefab InputModuleManager uses the player head local position and rotation. It will be possible to have abnormal behavior if this prefab is put under another GameObject.

Resources

Prefab InputModuleManager is located in Assets/WaveVR/Prefabs/

Script WaveVR_InputModuleManager is located in Assets/WaveVR/Scripts/EventSystem/

Scripts

The WaveVR_InputModuleManager option are shown as the photo below:

_images/WaveVR_InputModuleManager_01.png

Enable Input Module

This option can be selected/unselected to enable/disable Input Module .

It affects only the Event System

Override System Settings

WaveVR provides the Gaze and Controller input module. The default is Controller.

If this option is unselected, WaveVR_InputModuleManager will the use Controller input module.

By selecting this option, you can choose the Custom Input Module:

_images/WaveVR_InputModuleManager_02.png _images/WaveVR_InputModuleManager_03.png

The Controller Custom Input Module options are equivallent to WaveVR_ControllerInputModule except for:

  • Raycast Mode has three options: Mouse, Fixed and Beam.

    Mouse mode: The line of sight from the eye goes through the pointer. The intersection point is located on the cross position between the line of sight and the object.

    _images/WaveVR_InputModuleManager_Mouse.png

    Beam mode: The pointer is located on the intersection position when the controller is pointing to an object.

    If the controller is not pointing to any object, the pointer’s (x, y) changes following the controller rotation and keeps z distance of the initial value or the last intersection point z-coordinate.

    _images/WaveVR_InputModuleManager_Beam.png

    Fixed mode: The controller beam’s length is fixed and there is no controller pointer. There will be an intersection point if the controller beam crosses an object.

    _images/WaveVR_InputModuleManager_Fixed.png
  • Raycast Start Point means the location of the raycast event camera of mouse mode, there are three options (Center Of Eyes, Left Eye and Right Eye).

The options of gaze Custom Input Module is equivalent to WaveVR_GazeInputModule

Tips

How to enable/disable input module in runtime?

WaveVR_InputModuleManager.Instance.EnableInputModule = true;    // or false

How to switch Custom Input Module in runtime?

WaveVR_InputModuleManager.Instance.CustomInputModule = WaveVR_EInputModule.Controller;  // or WaveVR_EInputModule.Gaze;