跳转至

AnimationNodeBlendSpace1D

继承

AnimationRootNode

简要描述

线性混合位于虚拟轴上的任何数量的AnimationNode当中的两个。

描述

要添加到AnimationNodeBlendTree的资源。

这是一个虚拟轴,您可以在其上使用add_blend_point添加任何类型的AnimationNode

输出最接近节点当前值的两个AnimationNode的线性混合。

您可以使用min_spacemax_space设置轴的范围。

成员

类型 属性名 默认值
float max_space 1.0
float min_space -1.0
float snap 0.1
String value_label "value"

方法

返回值类型 方法名称
void add_blend_point(node: AnimationRootNode, pos: float, at_index: int = -1)
int get_blend_point_count() const
AnimationRootNode get_blend_point_node(point: int) const
float get_blend_point_position(point: int) const
void remove_blend_point(point: int)
void set_blend_point_node(point: int, node: AnimationRootNode)
void set_blend_point_position(point: int, pos: float)

常量

成员说明

  • float max_space
Default 1.0
setter set_max_space(value)
getter get_max_space
  • float min_space
Default -1.0
setter set_min_space(value)
getter get_min_space
  • float snap
Default 0.1
setter set_snap(value)
getter get_snap
  • String value_label
Default "value"
setter set_value_label(value)
getter get_value_label

方法说明

  • add_blend_point add_blend_point(node: AnimationRootNode, pos: float, at_index: int = -1)

在由pos的给定位置处,在虚拟轴上添加一个表示node的新点。可以使用at_index参数将其插入特定索引。如果对at_index使用默认值,则该点将插入到混合点数组的末尾。


  • get_blend_point_count get_blend_point_count() const

返回混合轴上的点数。


  • get_blend_point_node get_blend_point_node(point: int) const

返回索引point处的点所引用的AnimationNode


  • get_blend_point_position get_blend_point_position(point: int) const

返回索引point上点的位置。


  • remove_blend_point remove_blend_point(point: int)

从混合轴中删除索引为point的点。


  • set_blend_point_node set_blend_point_node(point: int, node: AnimationRootNode)

更改索引point处的点所引用的AnimationNode


  • set_blend_point_position set_blend_point_position(point: int, pos: float)

更新混合轴上索引point上的点的位置。