diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index aad72f9..a6a75b6 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -117,6 +117,7 @@ var _drag_active : bool = false var _press_was_on_board: bool = false # true only when the PRESS came from unhandled_input (board, not a UI card) var _camera_oriented : bool = false var _pan_active : bool = false +var _orbit_active : bool = false # right-mouse drag → camera orbit on desktop var _last_mouse : Vector2 = Vector2.ZERO var _touch_points : Dictionary = {} var _pinch_dist : float = 0.0 @@ -795,6 +796,9 @@ func _unhandled_input(event: InputEvent) -> void: elif mb.button_index == MOUSE_BUTTON_MIDDLE: _pan_active = mb.pressed _last_mouse = mb.position + elif mb.button_index == MOUSE_BUTTON_RIGHT: + _orbit_active = mb.pressed + _last_mouse = mb.position elif mb.button_index == MOUSE_BUTTON_LEFT: if mb.pressed: # Double-click on a battlefield unit → show full card detail popup. @@ -827,15 +831,11 @@ func _unhandled_input(event: InputEvent) -> void: _last_mouse = mm.position # 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() - if _drag_active: - _cam_yaw -= delta.x * 0.4 - _cam_pitch = clampf(_cam_pitch + delta.y * 0.3, 15.0, 75.0) - _apply_camera() + # Right-mouse drag orbits camera on desktop; left-click is reserved for board actions. + if _orbit_active and _touch_points.is_empty() and not _was_multi_touch: + _cam_yaw -= delta.x * 0.4 + _cam_pitch = clampf(_cam_pitch + delta.y * 0.3, 15.0, 75.0) + _apply_camera() # Always update cursor/hover on mouse move (even while drag — hides during drag). _update_hover(mm.position) if _pan_active: