From 95841b724a2f4d0dc23f699ad750443429294ef8 Mon Sep 17 00:00:00 2001 From: dingo Date: Tue, 31 Mar 2026 09:44:58 -0400 Subject: [PATCH] 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 Co-Authored-By: Happy --- Client/origin-client/scenes/game/game_screen.gd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index a4f4664..05e81d5 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -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.