Blends linearly between three AnimationNode of any type placed in a 2d space.
    public class AnimationNodeBlendSpace2D : AnimationRootNode

A resource to add to an AnimationNodeBlendTree.

This node allows you to blend linearly between three animations using a Vector2 weight.

You can add vertices to the blend space with AddBlendPoint(Godot.AnimationRootNode, Godot.Vector2, int) and automatically triangulate it by setting AutoTriangles to true. Otherwise, use AddTriangle(int, int, int, int) and RemoveTriangle(int) to create up the blend space by hand.

Inheritance Chain

Constructors

    public AnimationNodeBlendSpace2D()

Signals

    "triangles_updated" ()

Emitted every time the blend space’s triangles are created, removed, or when one of their vertices changes position.

Properties

    public bool AutoTriangles { get; set; }

If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with AddBlendPoint(Godot.AnimationRootNode, Godot.Vector2, int) and RemoveBlendPoint(int).

    public BlendModeEnum BlendMode { get; set; }

Controls the interpolation between animations. See BlendMode constants.

    public AnimationRootNode BlendPoint0__node { get; set; }

    public Vector2 BlendPoint0__pos { get; set; }

    public AnimationRootNode BlendPoint1__node { get; set; }

    public Vector2 BlendPoint1__pos { get; set; }

    public AnimationRootNode BlendPoint10__node { get; set; }

    public Vector2 BlendPoint10__pos { get; set; }

    public AnimationRootNode BlendPoint11__node { get; set; }

    public Vector2 BlendPoint11__pos { get; set; }

    public AnimationRootNode BlendPoint12__node { get; set; }

    public Vector2 BlendPoint12__pos { get; set; }

    public AnimationRootNode BlendPoint13__node { get; set; }

    public Vector2 BlendPoint13__pos { get; set; }

    public AnimationRootNode BlendPoint14__node { get; set; }

    public Vector2 BlendPoint14__pos { get; set; }

    public AnimationRootNode BlendPoint15__node { get; set; }

    public Vector2 BlendPoint15__pos { get; set; }

    public AnimationRootNode BlendPoint16__node { get; set; }

    public Vector2 BlendPoint16__pos { get; set; }

    public AnimationRootNode BlendPoint17__node { get; set; }

    public Vector2 BlendPoint17__pos { get; set; }

    public AnimationRootNode BlendPoint18__node { get; set; }

    public Vector2 BlendPoint18__pos { get; set; }

    public AnimationRootNode BlendPoint19__node { get; set; }

    public Vector2 BlendPoint19__pos { get; set; }

    public AnimationRootNode BlendPoint2__node { get; set; }

    public Vector2 BlendPoint2__pos { get; set; }

    public AnimationRootNode BlendPoint20__node { get; set; }

    public Vector2 BlendPoint20__pos { get; set; }

    public AnimationRootNode BlendPoint21__node { get; set; }

    public Vector2 BlendPoint21__pos { get; set; }

    public AnimationRootNode BlendPoint22__node { get; set; }

    public Vector2 BlendPoint22__pos { get; set; }

    public AnimationRootNode BlendPoint23__node { get; set; }

    public Vector2 BlendPoint23__pos { get; set; }

    public AnimationRootNode BlendPoint24__node { get; set; }

    public Vector2 BlendPoint24__pos { get; set; }

    public AnimationRootNode BlendPoint25__node { get; set; }

    public Vector2 BlendPoint25__pos { get; set; }

    public AnimationRootNode BlendPoint26__node { get; set; }

    public Vector2 BlendPoint26__pos { get; set; }

    public AnimationRootNode BlendPoint27__node { get; set; }

    public Vector2 BlendPoint27__pos { get; set; }

    public AnimationRootNode BlendPoint28__node { get; set; }

    public Vector2 BlendPoint28__pos { get; set; }

    public AnimationRootNode BlendPoint29__node { get; set; }

    public Vector2 BlendPoint29__pos { get; set; }

    public AnimationRootNode BlendPoint3__node { get; set; }

    public Vector2 BlendPoint3__pos { get; set; }

    public AnimationRootNode BlendPoint30__node { get; set; }

    public Vector2 BlendPoint30__pos { get; set; }

    public AnimationRootNode BlendPoint31__node { get; set; }

    public Vector2 BlendPoint31__pos { get; set; }

    public AnimationRootNode BlendPoint32__node { get; set; }

    public Vector2 BlendPoint32__pos { get; set; }

    public AnimationRootNode BlendPoint33__node { get; set; }

    public Vector2 BlendPoint33__pos { get; set; }

    public AnimationRootNode BlendPoint34__node { get; set; }

    public Vector2 BlendPoint34__pos { get; set; }

    public AnimationRootNode BlendPoint35__node { get; set; }

    public Vector2 BlendPoint35__pos { get; set; }

    public AnimationRootNode BlendPoint36__node { get; set; }

    public Vector2 BlendPoint36__pos { get; set; }

    public AnimationRootNode BlendPoint37__node { get; set; }

    public Vector2 BlendPoint37__pos { get; set; }

    public AnimationRootNode BlendPoint38__node { get; set; }

    public Vector2 BlendPoint38__pos { get; set; }

    public AnimationRootNode BlendPoint39__node { get; set; }

    public Vector2 BlendPoint39__pos { get; set; }

    public AnimationRootNode BlendPoint4__node { get; set; }

    public Vector2 BlendPoint4__pos { get; set; }

    public AnimationRootNode BlendPoint40__node { get; set; }

    public Vector2 BlendPoint40__pos { get; set; }

    public AnimationRootNode BlendPoint41__node { get; set; }

    public Vector2 BlendPoint41__pos { get; set; }

    public AnimationRootNode BlendPoint42__node { get; set; }

    public Vector2 BlendPoint42__pos { get; set; }

    public AnimationRootNode BlendPoint43__node { get; set; }

    public Vector2 BlendPoint43__pos { get; set; }

    public AnimationRootNode BlendPoint44__node { get; set; }

    public Vector2 BlendPoint44__pos { get; set; }

    public AnimationRootNode BlendPoint45__node { get; set; }

    public Vector2 BlendPoint45__pos { get; set; }

    public AnimationRootNode BlendPoint46__node { get; set; }

    public Vector2 BlendPoint46__pos { get; set; }

    public AnimationRootNode BlendPoint47__node { get; set; }

    public Vector2 BlendPoint47__pos { get; set; }

    public AnimationRootNode BlendPoint48__node { get; set; }

    public Vector2 BlendPoint48__pos { get; set; }

    public AnimationRootNode BlendPoint49__node { get; set; }

    public Vector2 BlendPoint49__pos { get; set; }

    public AnimationRootNode BlendPoint5__node { get; set; }

    public Vector2 BlendPoint5__pos { get; set; }

    public AnimationRootNode BlendPoint50__node { get; set; }

    public Vector2 BlendPoint50__pos { get; set; }

    public AnimationRootNode BlendPoint51__node { get; set; }

    public Vector2 BlendPoint51__pos { get; set; }

    public AnimationRootNode BlendPoint52__node { get; set; }

    public Vector2 BlendPoint52__pos { get; set; }

    public AnimationRootNode BlendPoint53__node { get; set; }

    public Vector2 BlendPoint53__pos { get; set; }

    public AnimationRootNode BlendPoint54__node { get; set; }

    public Vector2 BlendPoint54__pos { get; set; }

    public AnimationRootNode BlendPoint55__node { get; set; }

    public Vector2 BlendPoint55__pos { get; set; }

    public AnimationRootNode BlendPoint56__node { get; set; }

    public Vector2 BlendPoint56__pos { get; set; }

    public AnimationRootNode BlendPoint57__node { get; set; }

    public Vector2 BlendPoint57__pos { get; set; }

    public AnimationRootNode BlendPoint58__node { get; set; }

    public Vector2 BlendPoint58__pos { get; set; }

    public AnimationRootNode BlendPoint59__node { get; set; }

    public Vector2 BlendPoint59__pos { get; set; }

    public AnimationRootNode BlendPoint6__node { get; set; }

    public Vector2 BlendPoint6__pos { get; set; }

    public AnimationRootNode BlendPoint60__node { get; set; }

    public Vector2 BlendPoint60__pos { get; set; }

    public AnimationRootNode BlendPoint61__node { get; set; }

    public Vector2 BlendPoint61__pos { get; set; }

    public AnimationRootNode BlendPoint62__node { get; set; }

    public Vector2 BlendPoint62__pos { get; set; }

    public AnimationRootNode BlendPoint63__node { get; set; }

    public Vector2 BlendPoint63__pos { get; set; }

    public AnimationRootNode BlendPoint7__node { get; set; }

    public Vector2 BlendPoint7__pos { get; set; }

    public AnimationRootNode BlendPoint8__node { get; set; }

    public Vector2 BlendPoint8__pos { get; set; }

    public AnimationRootNode BlendPoint9__node { get; set; }

    public Vector2 BlendPoint9__pos { get; set; }

    public Vector2 MaxSpace { get; set; }

The blend space’s X and Y axes’ upper limit for the points’ position. See AddBlendPoint(Godot.AnimationRootNode, Godot.Vector2, int).

    public Vector2 MinSpace { get; set; }

The blend space’s X and Y axes’ lower limit for the points’ position. See AddBlendPoint(Godot.AnimationRootNode, Godot.Vector2, int).

    public Vector2 Snap { get; set; }

Position increment to snap to when moving a point.

    public int[] Triangles { get; set; }

    public string XLabel { get; set; }

Name of the blend space’s X axis.

    public string YLabel { get; set; }

Name of the blend space’s Y axis.

Methods

    public void AddBlendPoint(AnimationRootNode node, Vector2 pos, int atIndex = -1)

Adds a new point that represents a node at the position set by pos. You can insert it at a specific index using the atIndex argument. If you use the default value for atIndex , the point is inserted at the end of the blend points array.

    public void AddTriangle(int x, int y, int z, int atIndex = -1)

Creates a new triangle using three points x, y, and z. Triangles can overlap. You can insert the triangle at a specific index using the atIndex argument. If you use the default value for atIndex , the point is inserted at the end of the blend points array.

    [Obsolete("GetAutoTriangles is deprecated. Use the AutoTriangles property instead.")]
    public bool GetAutoTriangles()

Getter for AutoTriangles

    [Obsolete("GetBlendMode is deprecated. Use the BlendMode property instead.")]
    public BlendModeEnum GetBlendMode()

Getter for BlendMode

    public int GetBlendPointCount()

Returns the number of points in the blend space.

    [Obsolete("GetBlendPointNode is deprecated. Use the BlendPoint63__node property instead.")]
    public AnimationRootNode GetBlendPointNode(int point)

Returns the AnimationRootNode referenced by the point at index point.

    [Obsolete("GetBlendPointPosition is deprecated. Use the BlendPoint63__pos property instead.")]
    public Vector2 GetBlendPointPosition(int point)

Returns the position of the point at index point.

    [Obsolete("GetMaxSpace is deprecated. Use the MaxSpace property instead.")]
    public Vector2 GetMaxSpace()

Getter for MaxSpace

    [Obsolete("GetMinSpace is deprecated. Use the MinSpace property instead.")]
    public Vector2 GetMinSpace()

Getter for MinSpace

    [Obsolete("GetSnap is deprecated. Use the Snap property instead.")]
    public Vector2 GetSnap()

Getter for Snap

    public int GetTriangleCount()

Returns the number of triangles in the blend space.

    public int GetTrianglePoint(int triangle, int point)

Returns the position of the point at index point in the triangle of index triangle.

    [Obsolete("GetXLabel is deprecated. Use the XLabel property instead.")]
    public string GetXLabel()

Getter for XLabel

    [Obsolete("GetYLabel is deprecated. Use the YLabel property instead.")]
    public string GetYLabel()

Getter for YLabel

    public void RemoveBlendPoint(int point)

Removes the point at index point from the blend space.

    public void RemoveTriangle(int triangle)

Removes the triangle at index triangle from the blend space.

    [Obsolete("SetAutoTriangles is deprecated. Use the AutoTriangles property instead.")]
    public void SetAutoTriangles(bool enable)

Setter for AutoTriangles

    [Obsolete("SetBlendMode is deprecated. Use the BlendMode property instead.")]
    public void SetBlendMode(BlendModeEnum mode)

Setter for BlendMode

    public void SetBlendPointNode(int point, AnimationRootNode node)

Changes the AnimationNode referenced by the point at index point.

    [Obsolete("SetBlendPointPosition is deprecated. Use the BlendPoint63__pos property instead.")]
    public void SetBlendPointPosition(int point, Vector2 pos)

Updates the position of the point at index point on the blend axis.

    [Obsolete("SetMaxSpace is deprecated. Use the MaxSpace property instead.")]
    public void SetMaxSpace(Vector2 maxSpace)

Setter for MaxSpace

    [Obsolete("SetMinSpace is deprecated. Use the MinSpace property instead.")]
    public void SetMinSpace(Vector2 minSpace)

Setter for MinSpace

    [Obsolete("SetSnap is deprecated. Use the Snap property instead.")]
    public void SetSnap(Vector2 snap)

Setter for Snap

    [Obsolete("SetXLabel is deprecated. Use the XLabel property instead.")]
    public void SetXLabel(string text)

Setter for XLabel

    [Obsolete("SetYLabel is deprecated. Use the YLabel property instead.")]
    public void SetYLabel(string text)

Setter for YLabel

Inner Types

BlendModeEnum

Name Value Description
Interpolated 0 The interpolation between animations is linear.
Discrete 1 The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations.
DiscreteCarry 2 Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation’s playback position.
Tags: