AutoMovie API
    Preparing search index...

    Variable resolveAttachmentConst

    resolveAttachment: (
        parentPose: IAutoMoviePose,
        parentSkeleton: IAutoMovieSkeleton,
        attachment: IAutoMovieAttachment,
        jointAxes?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieJointAxes>>,
        restFrames?: Partial<Record<AutoMovieHumanoidBone, IAutoMovieRestFrame>>,
        prepared?: prepareSkeletonPoseResolution.IBoneDemand,
        resolution?: ReturnType<typeof preparePoseResolution>,
    ) => IAutoMovieTransform = ...

    The transform of a child model's root rigidly coupled to one bone of a posed parent skeleton, in the parent skeleton's model space: a rider on a horse, a sword in a hand, a passenger in a cart.

    The parent pose is resolved by forward kinematics (resolvePose) and the attachment offset is composed into the bone's frame:

    • translation = boneWorldPos + boneWorldRot · offset.translation
    • rotation = boneWorldRot ∘ offset.rotation
    • scale = offset.scale, copied

    The child follows both where the bone is and how it is turned, as a physics fixed joint carries one body on another. Feed the result to the child as its root each frame.

    Throws when the bone is not among the resolved bones, because it is not declared or not reachable from a root: a mis-wired attachment is a defect, not a frame to skip. jointAxes and restFrames must match the renderer's pose path, or the child rides a different pose than the visible parent.

    Type Declaration