Menu interactions in VR

This script allows you to interact with a menu using VR controllers.


 * 1) Create a menu that uses Unity UI as its Source, and set its Canvas to act in World Space.
 * 2) For each Button in contains, attach a Box Collider that covers it.
 * 3) Copy/paste the script below into a C# script named TouchUI.cs, and attach it to each of the VR rig's controllers (the objects with the Tracked Pose Driver component)
 * 4) Fill in the Touch UI Inspector, optionally assigning a Line Renderer to provide a line pointing from the controller.
 * 5) For each, assign a Trigger Input Axis name, and define this name in Unity's Input Manager.  Give the input a positive button of "joystick button 14" and "joystick button 15" for LeftTrigger / RightTrigger respectively.

TouchUI.cs: