void Update() { if (VRInput.GetButtonDown(button, hand)) { SetEnabled(!enabled); } }
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(); } } }
void Update() { if (VRInput.GetButton(VRInput.Button.RightIndexTrigger)) { gun.Fire(); } if (VRInput.GetButtonDown(VRInput.Button.RightGripTrigger)) { gun.Reload(); } }