From ed5e8f12c3377af36a7ceb9af65a0d34b31ee7b4 Mon Sep 17 00:00:00 2001 From: Shard Date: Sun, 29 Mar 2026 13:48:31 +0000 Subject: [PATCH] Guard mouse orbit during touch gestures in browser --- Client/origin-client/scenes/game/game_screen.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index cc63f2c..68f892a 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -821,7 +821,10 @@ func _unhandled_input(event: InputEvent) -> void: var mm := event as InputEventMouseMotion var delta := mm.position - _last_mouse _last_mouse = mm.position - if mm.button_mask & MOUSE_BUTTON_MASK_LEFT: + # On some mobile browsers, pinch emits synthetic mouse-motion/left-drag + # alongside touch/gesture events. Ignore mouse-orbit while touch is active + # (or was recently multi-touch) to prevent accidental camera spin. + if mm.button_mask & MOUSE_BUTTON_MASK_LEFT and _touch_points.is_empty() and not _was_multi_touch: if delta.length() > 2.0: _drag_active = true _hold_timer.stop()