orientationAlong

function orientationAlong
cinematic.ts:1140
orientationAlong(path: LinePath, upHint: Vec3) → Quat

The attitude for flying a LinePath: nose along the line, horizon leveled against upHint.

It takes the path rather than a frame because the answer does not depend on the frame. A straight line has one flight direction, so the derived attitude is a constant and the nose cannot drift off the velocity — there is nothing for it to drift with respect to. Sliding is impossible by construction rather than within a tolerance, which is the whole argument for fitting lines. Authored facing beats carry no such guarantee: between two hand-written vectors the slerp passes through whatever it passes through, and the f1000→f1035 pair swings about 120° in 35 frames with no intermediate that is a flight attitude at all.

direction is the direction of flight, which is why an approach is authored as a negative advance closing on the anchor rather than a positive one shrinking toward it — written the other way the ship flies tail-first. This deliberately does not read the advance to work the sense out: an attitude that silently flips on the sign of a number elsewhere in the literal is worse than one that is wrong in plain sight, and reversing a pass is negating direction and every t, which describes the identical line.

pathLinePath
Undocumented
upHintVec3
Undocumented
ReturnsQuat