void Update() { if (VRInput.GetDown(GenericVRButton.Index, handedness)) { Shoot(); } }
private void Update() { if (VRInput.GetDown(GenericVRButton.Hand, handedness)) { Grab(); } else if (VRInput.GetUp(GenericVRButton.Hand, handedness)) { Drop(); } }
public void CheckForUse() { if (inputIsDiscrete && VRInput.GetDown(useButton, handedness)) { onUse.Invoke(); } else if (!inputIsDiscrete && VRInput.Get(useButton, handedness)) { onUse.Invoke(); } }
private Queue <Vector3> velocityInputs = new Queue <Vector3>(); //calculate to handle throwing private void Update() { UpdateVelocity(); print(velocityInputs); if (VRInput.GetDown(GenericVRButton.Hand, handedness)) { Grab(); } else if (VRInput.GetUp(GenericVRButton.Hand, handedness)) { Drop(); } }
private void Update() { UpdateVelocity(); if (VRInput.GetDown(GenericVRButton.Hand, handedness)) { Grab(); } else if (VRInput.GetUp(GenericVRButton.Hand, handedness)) { Drop(); } if (grabbedComponent) { grabbedComponent.CheckForUse(); } }