mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Fix spatial viewport multitouch detection support
Regression introduced by https://github.com/godotengine/godot/pull/77498
This commit is contained in:
parent
300748e52c
commit
2c050cc17e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user