private void OnButtonPressed(JAVR_ControllerInputAction action, InputFeatureUsage usage, XRNode node, float value)
 {
     if (lastButtonHit == null)
     {
         return;
     }
     if (usage == (InputFeatureUsage)CommonUsages.trigger && action == JAVR_ControllerInputAction.Press && node == this.node)
     {
         lastButtonHit.OnLaserPointerClick();
         confirmSound.Play();
     }
 }
 private void OnButtonPressed(JAVR_ControllerInputAction action, InputFeatureUsage usage, XRNode node, float value)
 {
     if (usage == (InputFeatureUsage)CommonUsages.menuButton && action == JAVR_ControllerInputAction.Press && node == XRNode.LeftHand)
     {
         active = !active;
         ShutOpenMenu(active);
         Vector3 flatForward = new Vector3(headTransform.forward.x, 0.0f, headTransform.forward.z).normalized;
         transform.localPosition = new Vector3(headTransform.localPosition.x, offset, headTransform.localPosition.z);
         transform.forward       = flatForward;
         previousFlatForward     = flatForward;
         previousPosition        = transform.localPosition;
     }
 }
Beispiel #3
0
 public static void InputDeviceButtonAction(JAVR_ControllerInputAction action, InputFeatureUsage usage, XRNode node, float value = 0.0f)
 {
     OnInputDeviceButtonAction?.Invoke(action, usage, node, value);
 }