Class AnimationNodeBlendSpace1D
- Namespace
- Godot
- Assembly
- GodotSharp.dll
A resource used by AnimationNodeBlendTree.
AnimationNodeBlendSpace1D represents a virtual axis on which any type of AnimationRootNodes can be added using AddBlendPoint(AnimationRootNode, float, int). Outputs the linear blend of the two AnimationRootNodes adjacent to the current value.
You can set the extents of the axis with MinSpace and MaxSpace.
public class AnimationNodeBlendSpace1D : AnimationRootNode, IDisposable
- Inheritance
-
AnimationNodeBlendSpace1D
- Implements
- Inherited Members
Constructors
AnimationNodeBlendSpace1D()
public AnimationNodeBlendSpace1D()
Properties
BlendMode
Controls the interpolation between animations. See AnimationNodeBlendSpace1D.BlendModeEnum constants.
public AnimationNodeBlendSpace1D.BlendModeEnum BlendMode { get; set; }
Property Value
MaxSpace
The blend space's axis's upper limit for the points' position. See AddBlendPoint(AnimationRootNode, float, int).
public float MaxSpace { get; set; }
Property Value
MinSpace
The blend space's axis's lower limit for the points' position. See AddBlendPoint(AnimationRootNode, float, int).
public float MinSpace { get; set; }
Property Value
Snap
Position increment to snap to when moving a point on the axis.
public float Snap { get; set; }
Property Value
Sync
If false
, the blended animations' frame are stopped when the blend value is 0
.
If true
, forcing the blended animations to advance frame.
public bool Sync { get; set; }
Property Value
ValueLabel
Label of the virtual axis of the blend space.
public string ValueLabel { get; set; }
Property Value
Methods
AddBlendPoint(AnimationRootNode, float, int)
Adds a new point that represents a node
on the virtual axis at a given 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 AddBlendPoint(AnimationRootNode node, float pos, int atIndex = -1)
Parameters
node
AnimationRootNodepos
floatatIndex
int
GetBlendPointCount()
Returns the number of points on the blend axis.
public int GetBlendPointCount()
Returns
GetBlendPointNode(int)
Returns the AnimationNode referenced by the point at index point
.
public AnimationRootNode GetBlendPointNode(int point)
Parameters
point
int
Returns
GetBlendPointPosition(int)
Returns the position of the point at index point
.
public float GetBlendPointPosition(int point)
Parameters
point
int
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
RemoveBlendPoint(int)
Removes the point at index point
from the blend axis.
public void RemoveBlendPoint(int point)
Parameters
point
int
SetBlendPointNode(int, AnimationRootNode)
Changes the AnimationNode referenced by the point at index point
.
public void SetBlendPointNode(int point, AnimationRootNode node)
Parameters
point
intnode
AnimationRootNode
SetBlendPointPosition(int, float)
Updates the position of the point at index point
on the blend axis.
public void SetBlendPointPosition(int point, float pos)