WaveVR_ControllerPointer

Contents

Introduction

Controller pointer is implemented by WaveVR_ControllerPointer script whose properties describe what the point looks like and what it behave.

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

The goal of this script likes the reticle of Gaze to draw the focus of controller beam for user in the VR world.

Sample Scene

  • Controller_Test: in Assets/Samples/Controller_Test/Scene/
  • ControllerInputModule_Test in Assets/Samples/ControllerInputModule_Test/Scene/
  • HelloVR: in Assets/Samples/HelloVR/

Resources

  • The script WaveVR_ControllerPointer.cs is located in Assets/WaveVR/Scripts.
  • 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/ControllerModel/Finch/Prefabs.

You can find them within the controller Prefabs of WVR_CONTROLLER_FINCH3DOF_1_0_MC_L and WVR_CONTROLLER_FINCH3DOF_1_0_MC_R.

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. They are fixed and not opened for adjustment.

  • pointerDistanceInMeters

The length means the location of pointer calculating from the start of controller beam.

  • kpointerDistanceMin

The minimum value of pointerDistanceInMeters.

  • kpointerDistanceMax

The maximum value of pointerDistanceInMeters.

  • pointerOuterAngle

The pointer angle of view from the start of controller beam

  • kpointerMinOuterAngle

The minimum angle value of pointerOuterAngle.

  • kpointerGrowthAngle

The smooth rendering factor of angle at which to expand the pointer when intersecting with an object.

  • pointerOuterDiameter

Current outer diameters of the pointer, before distance multiplication.

If you would like to define your own point. Please change its property value of the script WaveVR_ControllerPointer.cs listed above and follow the steps below to create your pointer object.

For distance adjustment, please revise the value of pointerDistanceInMeters.

For pointer size, please modify the value of kpointerMinOuterAngle and kpointerGrowthAngle.

  1. Create your own pointer object and define its name.
_images/01.png
  1. Add your mesh as component to your new created pointer object and change its propeties by yourself.
_images/02.png
  1. Select your own material, shader would be brought to the object if you’ve added the shader to the material during creating the material.
_images/03.png
  1. Add mesh component to the object.
_images/04.png
  1. Select mesh type.
_images/05.png
  1. Add your defined pointer scripts to your own object.
_images/06.png
  1. Select its device type and check the “Listen To Device” option.
_images/07.png