reckfellENGINE

AnimationNodeStateMachinePlayback

Controls an AnimationTree state-machine instance.

On this page
class AnimationNodeStateMachinePlaybackReckfellSharpInherits Resource

Retrieve it from your tree at the corresponding parameters/.../playback path. Start() requests a direct start; Travel() requests a transition route and can jump directly if none exists. Tree processing applies the change.

Do not create a separate playback instead of retrieving the live tree parameter. A graph resource can be shared while this object holds instance state.

Complete state example

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

AnimationNodeStateMachinePlaybackConstructor
# AnimationNodeStateMachinePlayback
C#
public AnimationNodeStateMachinePlayback();

Methods14

GetCurrentLengthfloat
# GetCurrentLength
C#
public float GetCurrentLength();

Returns the current state length. Note: It is possible that any AnimationRootNode can be nodes as well as animations. This means that there can be multiple animations within a single state. Which animation length has priority depends on the nodes connected inside it. Also, if a transition does not reset, the remaining length at that point will be returned.

Returns float
GetCurrentNodeStringName
# GetCurrentNode
C#
public StringName GetCurrentNode();

The current state name after the latest processing step. It is a graph element, not a gameplay entity. Start()/Travel() need not change it synchronously; wait for an AnimationTree step.

Returns StringName
GetCurrentPlayPositionfloat
# GetCurrentPlayPosition
C#
public float GetCurrentPlayPosition();

Returns the playback position within the current animation state.

Returns float
GetFadingFromLengthfloat
# GetFadingFromLength
C#
public float GetFadingFromLength();

Returns the playback state length of the node from AnimationNodeStateMachinePlayback.GetFadingFromNode. Returns 0 if no animation fade is occurring.

Returns float
GetFadingFromNodeStringName
# GetFadingFromNode
C#
public StringName GetFadingFromNode();

Returns the starting state of currently fading animation.

Returns StringName
GetFadingFromPlayPositionfloat
# GetFadingFromPlayPosition
C#
public float GetFadingFromPlayPosition();

Returns the playback position of the node from AnimationNodeStateMachinePlayback.GetFadingFromNode. Returns 0 if no animation fade is occurring.

Returns float
GetFadingLengthfloat
# GetFadingLength
C#
public float GetFadingLength();

Returns the length of the current fade animation. Returns 0 if no animation fade is occurring.

Returns float
GetFadingPositionfloat
# GetFadingPosition
C#
public float GetFadingPosition();

Returns the playback position of the current fade animation. Returns 0 if no animation fade is occurring.

Returns float
GetTravelPathReckfell.Collections.Array<StringName>
# GetTravelPath
C#
public Reckfell.Collections.Array<StringName> GetTravelPath();

Returns the current travel path as computed internally by the A* algorithm.

Returns Reckfell.Collections.Array<StringName>
IsPlayingbool
# IsPlaying
C#
public bool IsPlaying();

Returns true if an animation is playing.

Returns bool
Nextvoid
# Next
C#
public void Next();

If there is a next path by travel or auto advance, immediately transitions from the current state to the next state.

Startvoid
# Start
C#
public void Start(StringName node, bool reset = true);

Requests a direct state start without route finding. reset controls time reset. The tree applies it during processing, so an immediate GetCurrentNode() can still report the previous state.

Parameters
NameTypeDefault
nodeStringName—
resetbooltrue
Stopvoid
# Stop
C#
public void Stop();

Stops the currently playing animation.

Travelvoid
# Travel
C#
public void Travel(StringName toNode, bool resetOnTeleport = true);

Requests a route to a state through allowed graph transitions; processing applies the request. If no route exists, it can jump directly to the target, with reset controlled by resetOnTeleport. Do not use Travel() to authorize a gameplay action.

Parameters
NameTypeDefault
toNodeStringName—
resetOnTeleportbooltrue

Signals and events2

StateFinishedEvent
# StateFinished
C#
public event AnimationNodeStateMachinePlayback.StateFinishedEventHandler StateFinished;

Emitted when the state finishes playback. If state is a state machine set to grouped mode, its signals are passed through with its name prefixed. If there is a crossfade, this will be fired when the influence of the AnimationNodeStateMachinePlayback.GetFadingFromNode animation is no longer present.

Handler parameters
NameTypeDefault
stateStringName—
StateStartedEvent
# StateStarted
C#
public event AnimationNodeStateMachinePlayback.StateStartedEventHandler StateStarted;

Emitted when the state starts playback. If state is a state machine set to grouped mode, its signals are passed through with its name prefixed.

Handler parameters
NameTypeDefault
stateStringName—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.