This is a script to allow one to control the movement of an object with the touchpad on a vive controller and control the rotation of the object with the direction in which one looks.
Built using Unity 2019.2.8
- HTC Vive (HardWare)
- SteamVR Plugin
-
Import the latest SteamVR plugin from the Unity and add the "[Camera Rig]" and "[SteamVR]" prefab to the scene.
-
Setup a new SteamVR Input Action: Window -> SteamVR Action. Create a new action (I called mine "TouchpadTouch"), set the type to 'vector2' and then click "Open binding UI".

-
Click "Edit" for the current binding, Under "TrackPad" edit the position field and put in the vector2 "touchpadtouch" binding that was previously made and click "Save Personal Binding".

After click "Save and Generate" in the SteamVR input menu.
