Ejemplo n.º 1
0
 void controllerUpdate()
 {
     device = SteamVR_Controller.Input(1);
     Debug.Log("device: " + device.ToString());
     if (device.GetTouchDown(SteamVR_Controller.ButtonMask.Trigger))
     {
         Debug.Log("Activated 'PressDown' on the Trigger");
         anim.SetBool("Walk", true);
     }
     else if (device.GetTouchUp(SteamVR_Controller.ButtonMask.Trigger))
     {
         Debug.Log("Activated 'PressUP' on the Trigger");
         anim.SetBool("Walk", false);
     }
 }