From 6e27f57d7aafdd3483a7afbbc788d2bfe1474b09 Mon Sep 17 00:00:00 2001 From: dingo Date: Mon, 30 Mar 2026 17:34:31 -0400 Subject: [PATCH] Fix touch input: tap suppression must only fire when camera mode is active _touch_drag_active was set unconditionally on 36px drag, silently eating board taps even when no camera action occurred. Now only set when a camera mode (orbit/pan/zoom) is actually active. Gesture timer also immediately marks drag-active on activation so the 3s hold doesn't fire a board click. Buttons enlarged to 44px minimum height for touch usability. 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/GameScreen.tscn | 7 +++++-- Client/origin-client/scenes/game/game_screen.gd | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Client/origin-client/scenes/game/GameScreen.tscn b/Client/origin-client/scenes/game/GameScreen.tscn index a03dcea..961e6bc 100644 --- a/Client/origin-client/scenes/game/GameScreen.tscn +++ b/Client/origin-client/scenes/game/GameScreen.tscn @@ -335,8 +335,8 @@ anchor_right = 0.0 anchor_bottom = 0.0 offset_left = 8.0 offset_top = 56.0 -offset_right = 96.0 -offset_bottom = 164.0 +offset_right = 104.0 +offset_bottom = 200.0 visible = false [node name="CamCtrlVBox" type="VBoxContainer" parent="HUD/CamCtrlPanel"] @@ -346,17 +346,20 @@ theme_override_constants/separation = 4 [node name="CamOrbitBtn" type="Button" parent="HUD/CamCtrlPanel/CamCtrlVBox"] unique_name_in_owner = true layout_mode = 2 +custom_minimum_size = Vector2(0, 44) toggle_mode = true text = "Orbit" [node name="CamPanBtn" type="Button" parent="HUD/CamCtrlPanel/CamCtrlVBox"] unique_name_in_owner = true layout_mode = 2 +custom_minimum_size = Vector2(0, 44) toggle_mode = true text = "Pan" [node name="CamZoomBtn" type="Button" parent="HUD/CamCtrlPanel/CamCtrlVBox"] unique_name_in_owner = true layout_mode = 2 +custom_minimum_size = Vector2(0, 44) toggle_mode = true text = "Zoom" diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index 53d7137..c3de1a6 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -860,6 +860,9 @@ func _on_cam_gesture_timer_fired() -> void: _touch_cam_pan = true _touch_cam_orbit = false _touch_cam_zoom = false + # The user deliberately held — mark as drag so release won't fire a board click. + _touch_drag_active = true + _hold_timer.stop() # ── Input ───────────────────────────────────────────────────────────────────── @@ -989,8 +992,11 @@ func _unhandled_input(event: InputEvent) -> void: if _touch_points.size() == 1 and not _was_multi_touch: _touch_drag_total += sd.relative.length() if _touch_drag_total > 36.0: - _touch_drag_active = true _hold_timer.stop() + # Only suppress the tap click when a camera action will actually happen. + # Without this, a normal swipe with no camera mode active silently eats the touch. + if _touch_cam_orbit or _touch_cam_pan or _touch_cam_zoom: + _touch_drag_active = true if _touch_drag_active: if _touch_cam_orbit: _cam_yaw -= sd.relative.x * 0.4