Right-click orbit: start on a 250 ms hold instead of drag distance #861

Closed
opened 2026-10-19 08:12:58 +00:00 by sky_line · 1 comment
Owner

When Right-click drag orbits camera (RightClickDragOrbit) is on, orbit mode should start from a press-and-hold timer instead of drag distance.

Behaviour

  • Press and hold right-click on a spot. Once the button has been held for 250 ms, the viewer enters orbit view around the point under the cursor at the press.
  • Release before 250 ms: the normal right-click context menu opens at the press point, as it does today for a click.
  • Moving the mouse during the first 250 ms no longer starts orbit. Only the hold time decides.
  • On release after orbiting: orbit ends and the cursor returns to the press point (unchanged).
  • Mouselook and avatar customize: unchanged (no orbit).

Implementation notes

  • Today the decision is made in LLToolPie::handleHover (lltoolpie.cpp ~1021). Orbit starts once mRightAccum passes DRAG_N_DROP_DISTANCE_THRESHOLD.
  • With a timer, orbit must start even when the mouse is perfectly still, and hover events don't fire then. The timer check needs a per-frame/idle hook while mRightOrbitArmed is set, not just handleHover.
  • Record the press time in handleRightMouseDown and switch to orbit (hide cursor, setOrbitDragActive(true)) when the hold time passes.
  • Expose the delay as a setting (e.g. RightClickOrbitHoldMs, default 250).
  • Update the tooltip on right_drag_orbit in panel_preferences_move.xml to describe hold-to-orbit.

Acceptance

  • A quick right-click (<250 ms) opens the context menu, including a small accidental mouse movement.
  • Holding still for 250 ms enters orbit with no mouse movement needed; dragging then orbits.
  • The setting changes the threshold live.
When **Right-click drag orbits camera** (`RightClickDragOrbit`) is on, orbit mode should start from a **press-and-hold timer** instead of drag distance. ## Behaviour - Press and hold right-click on a spot. Once the button has been held for **250 ms**, the viewer enters orbit view around the point under the cursor at the press. - Release before 250 ms: the normal right-click context menu opens at the press point, as it does today for a click. - Moving the mouse during the first 250 ms no longer starts orbit. Only the hold time decides. - On release after orbiting: orbit ends and the cursor returns to the press point (unchanged). - Mouselook and avatar customize: unchanged (no orbit). ## Implementation notes - Today the decision is made in `LLToolPie::handleHover` (lltoolpie.cpp ~1021). Orbit starts once `mRightAccum` passes `DRAG_N_DROP_DISTANCE_THRESHOLD`. - With a timer, orbit must start even when the mouse is perfectly still, and hover events don't fire then. The timer check needs a per-frame/idle hook while `mRightOrbitArmed` is set, not just `handleHover`. - Record the press time in `handleRightMouseDown` and switch to orbit (hide cursor, `setOrbitDragActive(true)`) when the hold time passes. - Expose the delay as a setting (e.g. `RightClickOrbitHoldMs`, default 250). - Update the tooltip on `right_drag_orbit` in panel_preferences_move.xml to describe hold-to-orbit. ## Acceptance - A quick right-click (<250 ms) opens the context menu, including a small accidental mouse movement. - Holding still for 250 ms enters orbit with no mouse movement needed; dragging then orbits. - The setting changes the threshold live.
sky_line added this to the Slipstream project 2026-10-19 08:12:58 +00:00
Author
Owner

Fixed in 1.4.1 (13e242b086). Reopen if you still see it.

Fixed in 1.4.1 (13e242b086). Reopen if you still see it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#861
No description provided.