Engine API Reference - v2.23.0-beta.17
    Preparing search index...

    Class AnimBlendTreeCartesian2D

    An AnimBlendTree that calculates its weights using the 2D Cartesian algorithm from chapter 6, section 3 of Rune Skovbo Johansen's thesis.

    The children sit at points on a plane defined by two parameters, and weights are computed from where the current parameter point lies among them, treating the two axes as independent. Use it when the parameters are unrelated quantities, such as forward speed against turn rate.

    Hierarchy (View Summary)

    Index
    • Create a new AnimBlendTree instance.

      Parameters

      • state: AnimState

        The AnimState that this AnimBlendTree belongs to.

      • parent: AnimBlendTree | null

        The parent of the AnimBlendTree. If not null, the AnimNode is stored as part of a AnimBlendTree hierarchy.

      • name: string

        The name of the BlendTree. Used when assigning an AnimTrack to its children.

      • point: number | Vec2

        The coordinate/vector that's used to determine the weight of this node when it's part of an AnimBlendTree.

      • parameters: string[]

        The anim component parameters which are used to calculate the current weights of the blend trees children.

      • children: any[]

        The child nodes that this blend tree should create. Can either be of type AnimNode or AnimBlendTree.

      • syncAnimations: boolean

        If true, the speed of each blended animation will be synchronized.

      • createTree: Function

        Used to create child blend trees of varying types.

      • findParameter: Function

        Used at runtime to get the current parameter values.

      Returns AnimBlendTreeCartesian2D