AnimationNodeBlendSpace2D
Inherits: AnimationRootNode < AnimationNode < Resource < Reference < Object AnimationNode of any type placed in a 2D space.
Description
AnimationNodeBlendTree.
Vector2 weight.
add_blend_point and automatically triangulate it by setting auto_triangles to true. Otherwise, use add_triangle and remove_triangle to create up the blend space by hand.
Tutorials
- 使用 AnimationTree
- Third Person Shooter Demo
Properties
Methods
Signals
- triangles_updated ( )
Emitted every time the blend space’s triangles are created, removed, or when one of their vertices changes position.
Enumerations
BlendMode: - BLEND_MODE_INTERPOLATED = 0 —- The interpolation between animations is linear.
- BLEND_MODE_DISCRETE = 1 —- The blend space plays the animation of the node the blending position is closest to. Useful for frame-by-frame 2D animations.
- BLEND_MODE_DISCRETE_CARRY = 2 —- Similar to BLEND_MODE_DISCRETE, but starts the new animation at the last animation’s playback position.
Property Descriptions
- bool auto_triangles
true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with add_blend_point and remove_blend_point.
- BlendMode blend_mode BlendMode constants.
- Vector2 max_space add_blend_point.
- Vector2 min_space add_blend_point.
- Vector2 snap Position increment to snap to when moving a point.
- String x_label Name of the blend space’s X axis.
- String y_label
Name of the blend space’s Y axis.
Method Descriptions
- add_blend_point ( AnimationRootNode node, Vector2 pos, int at_index=-1 )
nodeat the position set bypos. You can insert it at a specific index using theat_indexargument. If you use the default value forat_index, the point is inserted at the end of the blend points array.
- add_triangle ( int x, int y, int z, int at_index=-1 )
x,y, andz. Triangles can overlap. You can insert the triangle at a specific index using theat_indexargument. If you use the default value forat_index, the point is inserted at the end of the blend points array.
- int get_blend_point_count ( ) const Returns the number of points in the blend space.
- AnimationRootNode get_blend_point_node ( int point ) const
AnimationRootNode referenced by the point at index
point.
- Vector2 get_blend_point_position ( int point ) const
point.
- int get_triangle_count ( ) const Returns the number of triangles in the blend space.
- int get_triangle_point ( int triangle, int point )
pointin the triangle of indextriangle.
- remove_blend_point ( int point )
pointfrom the blend space.
- remove_triangle ( int triangle )
trianglefrom the blend space.
- set_blend_point_node ( int point, AnimationRootNode node )
AnimationNode referenced by the point at index
point.
- set_blend_point_position ( int point, Vector2 pos )
pointon the blend axis.
