QCHT uses the new Unity Input System to fire events for pinch and grab gestures for the left and right hand. You can register to those callbacks as usual by using the Input System API with an InputActionProperty that's assigned in the editor. 


Here is a code snippet:

    [SerializeField] private InputActionProperty _leftHandPinch;

    private void OnEnable()
    {
        _leftHandPinch.EnableDirectAction();
    }

    private void OnDisable()
    {
        _leftHandPinch.DisableDirectAction();
    }

    private void Start()
    {
        _leftHandPinch.action.performed += LeftHandPinchPerformed;
    }

    private void LeftHandPinchPerformed(InputAction.CallbackContext obj)
    {
        Debug.Log("Left hand PINCHED");
    }


In the Unity Editor assign the corresponding input actions to the InputActionProperty:


Pinch

  • triggerPressed [LeftHand Qualcomm Hand]
  • triggerPressed [RightHand Qualcomm Hand]


Grab

  • grip [LeftHand Qualcomm Hand]
  • grip [RightHand Qualcomm Hand]