Avatars run backwards (moonwalk) instead of turning to face their running direction #796

Closed
opened 2026-10-16 11:29:00 +00:00 by sky_line · 0 comments
Owner

Regression. Avatars run backwards ("moonwalk") instead of turning to face the direction they're running.

Likely cause (unconfirmed, needs a repro to pin down): LLVOAvatar::updateOrientation (indra/newview/llvoavatar.cpp ~4395). For self with SLWalkBackwardsFacingForward (default on, #496, commits 1ebc06c350 / e7b48b3d97), keep_forward flips the velocity direction whenever the movement points more than ~120° away from the agent's at-axis (velDir * primDir < -0.5), on the ground, not flying / autopilot / sitting. That's meant for pressing back, but it triggers on any movement that points away from the at-axis. That includes running toward the camera, or any case where the at-axis isn't the run direction. The camera features that decouple facing from movement make this common:

  • the right-drag orbit rig where the avatar faces the camera (e6057c6434)
  • the TPS camera with "avatar faces camera direction" (c957f92272)
  • A/D strafe (SLStrafeWithAD, 24cf62ae5b)

Whether other residents' avatars are affected too should be checked. For them the flip only applies while the walk built-in is signalled, which is LL's original behaviour.

Proposed fix (owner): the avatar always faces the direction it's running. If "walk backwards facing forward" is kept, it should key off the actual back movement input (AGENT_CONTROL_AT_NEG with no forward/turn input), not off the angle between velocity and the at-axis. It also shouldn't apply while running, only while walking backwards deliberately.

Repro to confirm: run in a direction away from where the avatar's at-axis points (e.g. run toward the camera with the orbit rig / TPS face-camera option, or double-check plain S-key running), with SLWalkBackwardsFacingForward on vs off.

**Regression.** Avatars run backwards ("moonwalk") instead of turning to face the direction they're running. **Likely cause (unconfirmed, needs a repro to pin down):** `LLVOAvatar::updateOrientation` (`indra/newview/llvoavatar.cpp` ~4395). For self with `SLWalkBackwardsFacingForward` (default **on**, #496, commits 1ebc06c350 / e7b48b3d97), `keep_forward` flips the velocity direction whenever the movement points more than ~120° away from the agent's at-axis (`velDir * primDir < -0.5`), on the ground, not flying / autopilot / sitting. That's meant for pressing *back*, but it triggers on **any** movement that points away from the at-axis. That includes running toward the camera, or any case where the at-axis isn't the run direction. The camera features that decouple facing from movement make this common: - the right-drag orbit rig where the avatar faces the camera (e6057c6434) - the TPS camera with "avatar faces camera direction" (c957f92272) - A/D strafe (`SLStrafeWithAD`, 24cf62ae5b) Whether other residents' avatars are affected too should be checked. For them the flip only applies while the walk built-in is signalled, which is LL's original behaviour. **Proposed fix (owner):** the avatar always faces the direction it's running. If "walk backwards facing forward" is kept, it should key off the actual *back* movement input (AGENT_CONTROL_AT_NEG with no forward/turn input), not off the angle between velocity and the at-axis. It also shouldn't apply while running, only while walking backwards deliberately. **Repro to confirm:** run in a direction away from where the avatar's at-axis points (e.g. run toward the camera with the orbit rig / TPS face-camera option, or double-check plain S-key running), with `SLWalkBackwardsFacingForward` on vs off.
sky_line added this to the Slipstream project 2026-10-16 11:29:00 +00:00
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#796
No description provided.