public void OnGesture(List <LeanFinger> fingers) { Debug.Log("Gesture with " + fingers.Count + " finger(s)"); Debug.Log(" pinch scale: " + LeanGesture.GetPinchScale(fingers)); Debug.Log(" twist degrees: " + LeanGesture.GetTwistDegrees(fingers)); Debug.Log(" twist radians: " + LeanGesture.GetTwistRadians(fingers)); Debug.Log(" screen delta: " + LeanGesture.GetScreenDelta(fingers)); }
protected virtual void Update() { // Get fingers var fingers = LeanSelectable.GetFingers(IgnoreStartedOverGui, IgnoreIsOverGui, RequiredFingerCount, RequiredSelectable); if (fingers.Count > 0) { // Get twist var twist = Angle == AngleType.Degrees ? LeanGesture.GetTwistDegrees(fingers) : LeanGesture.GetTwistRadians(fingers); // Ignore? if (IgnoreIfStatic == true && twist == 0.0f) { return; } // Call events if (OnTwist != null) { OnTwist.Invoke(twist); } } }