You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Merge pull request #78085 from m4gr3d/fix_multitouch_detection_spatial_viewport_3x
[3.x] Fix spatial viewport multitouch detection support
This commit is contained in:
@@ -228,7 +228,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
|
|||||||
|
|
||||||
val x = terminusEvent.x
|
val x = terminusEvent.x
|
||||||
val y = terminusEvent.y
|
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)
|
GodotLib.pan(x, y, distanceX / 5f, distanceY / 5f)
|
||||||
} else if (!scaleInProgress) {
|
} else if (!scaleInProgress) {
|
||||||
dragInProgress = true
|
dragInProgress = true
|
||||||
@@ -238,7 +238,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScale(detector: ScaleGestureDetector): Boolean {
|
override fun onScale(detector: ScaleGestureDetector): Boolean {
|
||||||
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
|
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onScaleBegin(detector: ScaleGestureDetector): Boolean {
|
override fun onScaleBegin(detector: ScaleGestureDetector): Boolean {
|
||||||
if (!panningAndScalingEnabled || pointerCaptureInProgress) {
|
if (!panningAndScalingEnabled || pointerCaptureInProgress || dragInProgress) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
scaleInProgress = true
|
scaleInProgress = true
|
||||||
|
|||||||
Reference in New Issue
Block a user