swim-aim

Where a swimmer is pointing. The pure half of look-directed swimming: turning an aim input into a body pitch, easing it, and unwinding it when you stand up again. Babylon-free, deterministic, unit tested.

Why the body pitches at all

Swimming forward while standing bolt upright is the same class of wrongness as standing on the seabed under six metres of water — the animation says one thing and the geometry says another. Once the body pitches, movement follows for free: the biped already swims along its own forward vector, so tilting the body tilts the stroke. One rotation, no separate vertical term for the stroke, and no way for aim and motion to disagree.

Where the aim comes from, and why it differs by device

They converge on the same stored value, so the rest of the code — and the character — cannot tell which one is driving.

Degrees, positive DOWN

Positive is nose-down, matching RotationYawPitchRoll's pitch argument, so the value drops straight into a quaternion with no sign flip at the call site. Every sign bug in this repo's orientation code has come from a conversion at a boundary; this one does not have a boundary.