AutoMovie API
    Preparing search index...

    Variable rotateFormationLocalOffsetConst

    rotateFormationLocalOffset: (
        offset: IAutoMovieVector3,
        headingDeg: number,
    ) => IAutoMovieVector3 = ...

    Turn a unit-local displacement into the frame a unit's members are placed in.

    A member's offset is authored in its unit's own frame: +x is the unit's left-to-right and +z its front-to-back, whichever way the unit happens to be pointing. transformFormationPoint rotates a unit's interior by the same total heading, so an offset joins a placed point only after this turns it, and a member that stepped aside keeps stepping aside once its unit turns.

    Taken as a heading in degrees rather than as a unit, because the two consumers of this arithmetic hold different halves of it: a gate composing a whole world placement passes the unit's designed heading plus the offset its cue has turned it by, while a renderer whose scene graph already carries the cue's rotation passes only the designed heading. Finite heading and offset arithmetic are caller premises; a heading whose degree-to-radian product overflows propagates nonfinite coordinates.

    Type Declaration