diff options
author | Fredia Huya-Kouadio <fhuya@meta.com> | 2023-06-10 08:47:24 -0700 |
---|---|---|
committer | Fredia Huya-Kouadio <fhuya@meta.com> | 2023-06-10 08:47:24 -0700 |
commit | 2c050cc17e1fb011c69ba4455431dd2531fce2ae (patch) | |
tree | f64590900c36dd8d4b4b75c8e64300cf215dedce /platform/android/java/lib/src | |
parent | 300748e52c03fd1761b716fc7eea2b9fb97b86f9 (diff) | |
download | redot-engine-2c050cc17e1fb011c69ba4455431dd2531fce2ae.tar.gz |
Fix spatial viewport multitouch detection support
Regression introduced by https://github.com/godotengine/godot/pull/77498
Diffstat (limited to 'platform/android/java/lib/src')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt index e9bc435689..e26c9d39c2 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotGestureHandler.kt @@ -231,7 +231,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi val x = terminusEvent.x val y = terminusEvent.y - if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress) { + if (terminusEvent.pointerCount >= 2 && panningAndScalingEnabled && !pointerCaptureInProgress && !dragInProgress) { GodotLib.pan(x, y, distanceX / 5f, distanceY / 5f) } else if (!scaleInProgress){ dragInProgress = true @@ -241,7 +241,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi } override fun onScale(detector: ScaleGestureDetector): Boolean { - if (!panningAndScalingEnabled || pointerCaptureInProgress) { + if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) { return false } @@ -256,7 +256,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi } override fun onScaleBegin(detector: ScaleGestureDetector): Boolean { - if (!panningAndScalingEnabled || pointerCaptureInProgress) { + if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) { return false } scaleInProgress = true |