Ignore single-touch PanGesture to preserve one-finger orbit
This commit is contained in:
@@ -897,6 +897,11 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
_zoom((mg.factor - 1.0) * 8.0)
|
||||
|
||||
elif event is InputEventPanGesture:
|
||||
# On touch devices, treat pan-gesture as two-finger pan only.
|
||||
# Some browsers emit PanGesture during single-finger movement;
|
||||
# ignore that so single-finger remains orbit.
|
||||
if _touch_points.size() == 1 and not _was_multi_touch:
|
||||
return
|
||||
var pg := event as InputEventPanGesture
|
||||
var ps := _cam_distance * 0.004
|
||||
var right := _camera_rig.global_basis.x * -pg.delta.x * ps
|
||||
|
||||
Reference in New Issue
Block a user