AutoMovie API
    Preparing search index...

    Fit a whole articulated body to one endpoint goal while a support segment stays held, turning only about its contact.

    The tree is held from the support (rerootPhysicalProfile), and a virtual base hinges onto it at the contact point about the contact normal within the declared turn, so the old root (a pelvis) rotates, tilts and translates through the support chain's own joints while the reaching chain reaches. Every coordinate stays inside its own declared ROM, the contact point never moves, and the bounded articulation solver (solvePhysicalArticulationTargets) accepts only residual decreases. The residual is the goal point's world error in metres and, when an approach is declared, the weighted difference between the endpoint's local direction carried to world and the approach direction.

    type IInput = {
        bones: readonly string[];
        goal: {
            approach?: {
                direction: IAutoMovieVector3;
                localDirection: IAutoMovieVector3;
                weight: number;
            };
            bone: string;
            localPoint: IAutoMovieVector3;
            point: IAutoMovieVector3;
        };
        iterations: number;
        profile: IAutoMoviePhysicalProfile;
        support: {
            bone: string;
            maximum: number;
            minimum: number;
            normal: IAutoMovieVector3;
            point: IAutoMovieVector3;
        };
        targets: Readonly<Record<string, IAutoMovieRigidTransform>>;
        tolerance: number;
    }
    Index
    bones: readonly string[]

    Segments whose joint toward the old root may move: the support chain, the trunk and the reaching chain.

    goal: {
        approach?: {
            direction: IAutoMovieVector3;
            localDirection: IAutoMovieVector3;
            weight: number;
        };
        bone: string;
        localPoint: IAutoMovieVector3;
        point: IAutoMovieVector3;
    }

    The endpoint goal.

    Type Declaration

    • Optionalapproach?: {
          direction: IAutoMovieVector3;
          localDirection: IAutoMovieVector3;
          weight: number;
      }

      Optional arrival direction: the segment's local direction should point along it.

      • direction: IAutoMovieVector3

        Unit world direction.

      • localDirection: IAutoMovieVector3

        Unit direction in the segment's frame.

      • weight: number

        Metres of residual per unit of direction difference; positive.

    • bone: string

      Segment carrying the endpoint.

    • localPoint: IAutoMovieVector3

      Endpoint in that segment's frame, metres.

    • point: IAutoMovieVector3

      World goal point, metres.

    iterations: number

    Positive update budget, at most 64.

    Admitted fixed-pivot tree.

    support: {
        bone: string;
        maximum: number;
        minimum: number;
        normal: IAutoMovieVector3;
        point: IAutoMovieVector3;
    }

    The held support and its bounded turn about the contact normal.

    Type Declaration

    • bone: string

      Held segment.

    • maximum: number

      Upper turn, radians.

    • minimum: number

      Lower turn, radians.

    • normal: IAutoMovieVector3

      Unit world contact normal the support may turn about.

    • point: IAutoMovieVector3

      World contact point, metres.

    targets: Readonly<Record<string, IAutoMovieRigidTransform>>

    Current world pose of every segment.

    tolerance: number

    Positive residual early-out, metres.