Mouse steering: hold right button while click-dragging your avatar to walk forward (non-TPS mode) #254

Closed
opened 2026-10-02 21:09:56 +00:00 by sky_line · 2 comments
Owner

Request

In the normal (non-TPS) camera mode, while the user is holding left mouse on their avatar to steer (click-and-hold your avatar → mouse turns the avatar / pans the camera), holding the right mouse button makes the avatar walk forward. This is the classic MMO "both buttons = move forward" control. Releasing right stops walking; releasing left ends steering as today.

Details

  • Applies only during the existing click-and-hold-on-self steering mode (LLToolPie / LLToolCamera / the "click on avatar and drag to turn" path). Not in third-person-shooter camera mode (AlchemyTPSCamera), which has its own scheme.
  • Right-click while steering must not open the context / pie menu, and must not trigger right-drag orbit (RightClickDragOrbit). It's consumed as a movement input.
  • Movement goes through the normal agent controls (AGENT_CONTROL_AT_POS, same as W), so run / fly / always-run modifiers apply: flying moves forward in fly mode, and the run toggle is respected.
  • Direction follows the avatar's facing, which the steering drag updates, so you can steer while walking.
  • Optional: both buttons pressed in either order starts walking (left first then right, or right first then left while over self).
  • Setting to disable: SlipstreamMouseWalk (default on, or off if we want opt-in; decide in review).

Acceptance

  • Hold left on your avatar, then press and hold right: the avatar walks forward and turns with mouse movement.
  • Release right: it stops.
  • No context menu appears.
  • TPS camera mode is unaffected.
  • Flying moves forward.
## Request In the **normal** (non-TPS) camera mode, while the user is **holding left mouse on their avatar** to steer (click-and-hold your avatar → mouse turns the avatar / pans the camera), **holding the right mouse button makes the avatar walk forward.** This is the classic MMO "both buttons = move forward" control. Releasing right stops walking; releasing left ends steering as today. ## Details - Applies only during the existing click-and-hold-on-self steering mode (`LLToolPie` / `LLToolCamera` / the "click on avatar and drag to turn" path). Not in third-person-shooter camera mode (`AlchemyTPSCamera`), which has its own scheme. - Right-click while steering must **not** open the context / pie menu, and must not trigger right-drag orbit (`RightClickDragOrbit`). It's consumed as a movement input. - Movement goes through the normal agent controls (`AGENT_CONTROL_AT_POS`, same as W), so run / fly / always-run modifiers apply: flying moves forward in fly mode, and the run toggle is respected. - Direction follows the avatar's facing, which the steering drag updates, so you can steer while walking. - Optional: both buttons pressed in either order starts walking (left first then right, or right first then left while over self). - Setting to disable: `SlipstreamMouseWalk` (default on, or off if we want opt-in; decide in review). ## Acceptance - Hold left on your avatar, then press and hold right: the avatar walks forward and turns with mouse movement. - Release right: it stops. - No context menu appears. - TPS camera mode is unaffected. - Flying moves forward.
Author
Owner

Implemented on branch mousewalk (commit 7e3df6f8cd). It is not built yet; the main session builds it.

Where it lives: clicking and holding on your own avatar never reaches LLToolPie::startCameraSteering (that is the land/object drag-steer). LLToolPie::handleLeftClickPick hands the mouse to the transient LLToolCamera, and pickCallback sets mMouseSteering. So mouse walk is in lltoolfocus.{h,cpp}:

  • LLToolCamera::handleRightMouseDown consumes the right button while steering. It returns true through the mouse-captor branch of LLViewerWindow::handleAnyMouseClick, so no pie or context menu opens, no mouse bindings fire, and RightClickDragOrbit never sees the click.
  • LLToolCamera::updateMouseWalk() runs once per frame in llappviewer idle, before the TPS update and send_agent_update. It calls gAgent.moveAtNudge(1) for the first 0.25 s, then gAgent.moveAt(1), the same as the W key. Run, always-run and fly behave as with W. Dragging the mouse keeps turning the avatar.
  • Walking stops when you release right, release left, lose mouse capture, the window loses focus, you leave third person, the TPS camera engages, free-camera mode starts, or the setting is turned off. Movement locks are respected.

Setting: SlipstreamMouseWalk, on by default. It is in Preferences > Move & View, right column, as "Both mouse buttons walk", below "Right-click drag orbits camera".

Not done: pressing right first and then left. A right-click on yourself goes to LLToolPie, which opens the menu as soon as the button goes down (or arms orbit), so this can't be supported without changing when the menu opens. Steering by click-dragging on land (LLToolPie) is also not covered; that could be a follow-up.

Implemented on branch `mousewalk` (commit 7e3df6f8cd). It is not built yet; the main session builds it. **Where it lives:** clicking and holding on your own avatar never reaches `LLToolPie::startCameraSteering` (that is the land/object drag-steer). `LLToolPie::handleLeftClickPick` hands the mouse to the transient `LLToolCamera`, and `pickCallback` sets `mMouseSteering`. So mouse walk is in `lltoolfocus.{h,cpp}`: - `LLToolCamera::handleRightMouseDown` consumes the right button while steering. It returns true through the mouse-captor branch of `LLViewerWindow::handleAnyMouseClick`, so no pie or context menu opens, no mouse bindings fire, and `RightClickDragOrbit` never sees the click. - `LLToolCamera::updateMouseWalk()` runs once per frame in `llappviewer` idle, before the TPS update and `send_agent_update`. It calls `gAgent.moveAtNudge(1)` for the first 0.25 s, then `gAgent.moveAt(1)`, the same as the W key. Run, always-run and fly behave as with W. Dragging the mouse keeps turning the avatar. - Walking stops when you release right, release left, lose mouse capture, the window loses focus, you leave third person, the TPS camera engages, free-camera mode starts, or the setting is turned off. Movement locks are respected. **Setting:** `SlipstreamMouseWalk`, on by default. It is in Preferences > Move & View, right column, as "Both mouse buttons walk", below "Right-click drag orbits camera". **Not done:** pressing right first and then left. A right-click on yourself goes to `LLToolPie`, which opens the menu as soon as the button goes down (or arms orbit), so this can't be supported without changing when the menu opens. Steering by click-dragging on land (`LLToolPie`) is also not covered; that could be a follow-up.
Author
Owner

Verified done: holding right while steering your avatar walks forward like W (run/fly respected, no pie menu); setting SlipstreamMouseWalk in Preferences > Move & View. The optional right-then-left order is not supported (documented in the earlier comment). Commits: 7e3df6f8cd. Shipped in v1.0.0-beta.1.

Verified done: holding right while steering your avatar walks forward like W (run/fly respected, no pie menu); setting SlipstreamMouseWalk in Preferences > Move & View. The optional right-then-left order is not supported (documented in the earlier comment). Commits: 7e3df6f8cd. Shipped in v1.0.0-beta.1.
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#254
No description provided.