WaveVR_ControllerPointer

Contents

Introduction

The controller pointer is implemented by the WaveVR_ControllerPointer script, whose properties describe what the point looks like and how it behaves.

It is a point at the end of a controller beam to show what object (e.g. a cube, a blob, a menu item, etc.) the beam of the controller is pointing at.

The goal of this script is to indicate the focus of the controller beam, likes the reticle of Gaze, and to draw a pointer in the VR world.

Sample Scene

  • Controller_Test is located in Assets/Samples/Controller_Test/Scene/
  • ControllerInputModule_Test is located in Assets/Samples/ControllerInputModule_Test/Scene/
  • HelloVR is located in Assets/Samples/HelloVR/

Resources

  • The script WaveVR_ControllerPointer.cs is located in Assets/WaveVR/Scripts/ControllerModel/.
  • The appearance of the pointer is shaped by the material ControllerPointer.mat which is located in Assets/WaveVR/Resources.
  • The controller pointer shader WaveVR_CtrlrPointer.shader is located in Assets/WaveVR/Resources.
  • The pointer Prefabs (ControllerPointerL, ControllerPointerR) of controller are located in Assets/WaveVR/Prefabs.

You can find them within the controller Prefabs of Generic_MC_L and Generic_MC_R. Assets/WaveVR/Extra/GenericModel/Finch/Resources/Controller

Both ControllerPointerL and ControllerPointerR contain the WaveVR_ControllerPointer script component and mesh component with shader.

How to Use

The following is the property list of the controller pointer.

_images/018.png
  • Device

For which device type that the controller pointer is corresponding to. For example, the device type is Dominant in the picture above.

  • Show Pointer

Check to show a controller pointer, you can change this value in runtime.

  • Blink

If this option is checked and the Use Texture option is not checked, the controller pointer will blink. The default is false.

  • Pointer Outer Diameter

For the diameter of the controller pointer. The default is 0.01m.

  • Use Default Texture

If this option is checked, the controller pointer will use the WaveVR default texture. The default is true.

  • Custom Texture

You can specify a custom texture for the controller pointer. If the Use Default Texture option is not checked, the controller pointer will use the custom texture.

  • Use Texture

If this option is checked, the controller pointer will use the default texture or the custom texture.

Otherwise, the WaveVR_ControllerPointer.cs script will use the WaveVR_CtrlrPointer.shader to draw the controller pointer and the pointer color can be changed.