void Update()
 {
     if (VRInput.GetButtonDown(button, hand))
     {
         SetEnabled(!enabled);
     }
 }
Example #2
0
 void Update()
 {
     foreach (var vrInputEvent in _events)
     {
         if (VRInput.GetButtonDown(vrInputEvent.trigger) ||
             VRInput.GetAxisAsButtonDown(vrInputEvent.trigger))
         {
             vrInputEvent.unityEvent.Invoke(vrInputEvent.trigger);
         }
     }
 }
    private VRInteractable m_LastInteractible;                       //The last interactive item


    void Update()
    {
        EyeRaycast();

        if (VRInput.GetButtonDown(VRInput.Button.LeftIndexTrigger))
        {
            if (m_CurrentInteractible)
            {
                m_CurrentInteractible.OnClick();
            }
        }
    }
Example #4
0
    void Update()
    {
        if (VRInput.GetButton(VRInput.Button.RightIndexTrigger))
        {
            gun.Fire();
        }

        if (VRInput.GetButtonDown(VRInput.Button.RightGripTrigger))
        {
            gun.Reload();
        }
    }