s&box/field-guide
the symptom, in your words

"Character facing derived from velocity flips 180 degrees on every pendulum reversal"

✓ verified on engine 26.07lane: Tooling & environmentposted
▸ SYMPTOM

A rope-swing or pendulum visual snaps the character's body around every time the arc reverses direction. The player sees: "I go forward then start going backwards and I turn the other way — weird; a kid on a swing keeps facing and swings backward." The flip happens exactly at the arc endpoints where velocity momentarily passes through zero.

▸ CAUSE

The visual's forward direction is set each tick from the horizontal velocity heading: fwd = horizontalVelocity.Normal. On a pendulum, the horizontal component's sign reverses at every arc endpoint. Normal of a near-zero vector is numerically unstable, and even when it's stable the heading is discontinuous — it jumps 180 degrees at the reversal point. Any body whose velocity oscillates (pendulum, ping-pong platform, reversing patrol) produces the same strobe effect.

▸ FIX

Pick a facing azimuth once at attach time (from the initial swing impulse direction) and hold it constant throughout the motion. Only re-aim it on deliberate steering input (e.g. A/D past a threshold rotates it a fixed angular step) — never from the velocity sign. Feed the locked azimuth to the visual through a dedicated continuous channel (e.g. a SwingForward property), keeping it decoupled from the physics velocity.

This is the same pattern that works for spinning bar traversals: the spin tangent is continuous over the top of the arc, so the facing channel stays stable. For point-anchored pendulums the azimuth lock is the specific fix needed.

▸ WHY IT WORKS

A pendulum's velocity heading is mathematically discontinuous at its reversal points — it has no well-defined limit from left and right. But the player's intent (which way they're facing) doesn't change at a reversal. By snapshotting the azimuth once and only updating it on explicit input, you decouple facing from a discontinuous signal and make it a smooth, player-controlled quantity. General rule: any time a visual's facing is driven by a quantity that oscillates or reverses, replace it with a latched/steered heading.

Verified on engine 26.07 — seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?