Disable all multi-finger gestures in buttons camera mode

2-finger pinch/pan, 3-finger pan, MagnifyGesture, and PanGesture are
now gated behind gesture mode. In buttons mode only single-finger drag
(controlled by the active toggle button) affects the camera.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-31 09:44:58 -04:00
co-authored by Claude Happy
parent 7da9335599
commit 95841b724a
@@ -1022,7 +1022,7 @@ func _unhandled_input(event: InputEvent) -> void:
_apply_camera()
elif _touch_cam_zoom:
_zoom(sd.relative.y * -0.05)
elif _touch_points.size() == 3 and _touch_cam_pan:
elif Settings.touch_camera_mode == "gesture" and _touch_points.size() == 3 and _touch_cam_pan:
# 3-finger pan (gesture mode): only process the leading finger to avoid triple-apply.
var keys3 := _touch_points.keys()
keys3.sort()
@@ -1036,7 +1036,7 @@ func _unhandled_input(event: InputEvent) -> void:
_cam_pivot.x = clampf(_cam_pivot.x, -pan_lim3, pan_lim3)
_cam_pivot.z = clampf(_cam_pivot.z, -pan_lim3, pan_lim3)
_apply_camera()
elif _touch_points.size() >= 2:
elif Settings.touch_camera_mode == "gesture" and _touch_points.size() >= 2:
var keys := _touch_points.keys()
var pos_a : Vector2 = _touch_points[keys[0]]
var pos_b : Vector2 = _touch_points[keys[1]]
@@ -1061,10 +1061,13 @@ func _unhandled_input(event: InputEvent) -> void:
# Browsers sometimes emit these *instead of* dual ScreenDrag events.
# factor > 1.0 = spreading (zoom in), < 1.0 = pinching (zoom out).
elif event is InputEventMagnifyGesture:
var mg := event as InputEventMagnifyGesture
_zoom((mg.factor - 1.0) * 8.0)
if Settings.touch_camera_mode == "gesture":
var mg := event as InputEventMagnifyGesture
_zoom((mg.factor - 1.0) * 8.0)
elif event is InputEventPanGesture:
if Settings.touch_camera_mode != "gesture":
return
# 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.