void FixedUpdate()
{
device = SteamVR_Controller.Input ((int)trackedObj.index);
if (device.GetTouch (SteamVR_Controller.ButtonMask.Trigger)) {
Debug.Log ("You are holding 'touch' on the trigger");
}
if (device.GetTouchDown(SteamVR_Controller.ButtonMask.Trigger))
{
Debug.Log("You activated TouchDown on the trigger");
}
if (device.GetTouchUp(SteamVR_Controller.ButtonMask.Trigger))
{
Debug.Log("You activated TouchUp on the trigger");
}
if (device.GetPress(SteamVR_Controller.ButtonMask.Trigger))
{
Debug.Log("You are holding 'press' on the trigger");
}
if (device.GetPressDown(SteamVR_Controller.ButtonMask.Trigger))
{
Debug.Log("You activated PressDown on the trigger");
}
if (device.GetPressUp(SteamVR_Controller.ButtonMask.Touchpad))
{
Debug.Log("You activated PressUp on the touchpad");
sphere.transform.position = Vector3.zero;
sphere.GetComponent<Rigidbody>().velocity = Vector3.zero;
sphere.GetComponent<Rigidbody>().angularVelocity = Vector3.zero;
}
}