reckfellENGINE

Animation

A resource containing tracks, keys, duration and loop mode.

On this page
class AnimationReckfellSharpInherits Resource

Animation stores clip data. Add it to an AnimationLibrary and assign the library to AnimationPlayer, or use it through AnimationTree. The resource alone is not running playback.

Track type defines key format and target. Value paths include a property; specialized 3D tracks target an Entity3D or bone. Method tracks need explicit handling of seeking and repeated events.

Clips and keys · Tracks and events

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

Constructors1

AnimationConstructor
# Animation
C#
public Animation();

Properties4

CaptureIncludedProperty
# CaptureIncluded
C#
public bool CaptureIncluded { get; }

Returns true if the capture track is included. This is a cached readonly value for performance.

LengthProperty
# Length
C#
public double Length { get; set; }

The total length of the animation (in seconds). Note: Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.

LoopModeProperty
# LoopMode
C#
public Animation.LoopModeEnum LoopMode { get; set; }

Determines the behavior of both ends of the animation timeline during animation playback. This indicates whether and how the animation should be restarted, and is also used to correctly interpolate animation cycles.

StepProperty
# Step
C#
public float Step { get; set; }

The animation step value.

Methods91

AddMarkervoid
# AddMarker
C#
public void AddMarker(StringName name, double time);

Adds a marker to this Animation.

Parameters
NameTypeDefault
nameStringName—
timedouble—
AddTrackint
# AddTrack
C#
public int AddTrack(Animation.TrackType type, int atPosition = -1);

Adds a track to the Animation.

Parameters
NameTypeDefault
typeAnimation.TrackType—
atPositionint-1
Returns int
AnimationTrackGetKeyAnimationStringName
# AnimationTrackGetKeyAnimation
C#
public StringName AnimationTrackGetKeyAnimation(int trackIdx, int keyIdx);

Returns the animation name at the key identified by key_idx. The track_idx must be the index of an Animation Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns StringName
AnimationTrackInsertKeyint
# AnimationTrackInsertKey
C#
public int AnimationTrackInsertKey(int trackIdx, double time, StringName animation);

Inserts a key with value animation at the given time (in seconds). The track_idx must be the index of an Animation Track.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
animationStringName—
Returns int
AnimationTrackSetKeyAnimationvoid
# AnimationTrackSetKeyAnimation
C#
public void AnimationTrackSetKeyAnimation(int trackIdx, int keyIdx, StringName animation);

Sets the key identified by key_idx to value animation. The track_idx must be the index of an Animation Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
animationStringName—
AudioTrackGetKeyEndOffsetfloat
# AudioTrackGetKeyEndOffset
C#
public float AudioTrackGetKeyEndOffset(int trackIdx, int keyIdx);

Returns the end offset of the key identified by key_idx. The track_idx must be the index of an Audio Track. End offset is the number of seconds cut off at the ending of the audio stream.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns float
AudioTrackGetKeyStartOffsetfloat
# AudioTrackGetKeyStartOffset
C#
public float AudioTrackGetKeyStartOffset(int trackIdx, int keyIdx);

Returns the start offset of the key identified by key_idx. The track_idx must be the index of an Audio Track. Start offset is the number of seconds cut off at the beginning of the audio stream.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns float
AudioTrackGetKeyStreamResource
# AudioTrackGetKeyStream
C#
public Resource AudioTrackGetKeyStream(int trackIdx, int keyIdx);

Returns the audio stream of the key identified by key_idx. The track_idx must be the index of an Audio Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns Resource
AudioTrackInsertKeyint
# AudioTrackInsertKey
C#
public int AudioTrackInsertKey(int trackIdx, double time, Resource stream, float startOffset = 0f, float endOffset = 0f);

Inserts an Audio Track key at the given time in seconds. The track_idx must be the index of an Audio Track. stream is the AudioStream resource to play. start_offset is the number of seconds cut off at the beginning of the audio stream, while end_offset is at the ending.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
streamResource—
startOffsetfloat0f
endOffsetfloat0f
Returns int
AudioTrackIsUseBlendbool
# AudioTrackIsUseBlend
C#
public bool AudioTrackIsUseBlend(int trackIdx);

Returns true if the track at track_idx will be blended with other animations.

Parameters
NameTypeDefault
trackIdxint—
Returns bool
AudioTrackSetKeyEndOffsetvoid
# AudioTrackSetKeyEndOffset
C#
public void AudioTrackSetKeyEndOffset(int trackIdx, int keyIdx, float offset);

Sets the end offset of the key identified by key_idx to value offset. The track_idx must be the index of an Audio Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
offsetfloat—
AudioTrackSetKeyStartOffsetvoid
# AudioTrackSetKeyStartOffset
C#
public void AudioTrackSetKeyStartOffset(int trackIdx, int keyIdx, float offset);

Sets the start offset of the key identified by key_idx to value offset. The track_idx must be the index of an Audio Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
offsetfloat—
AudioTrackSetKeyStreamvoid
# AudioTrackSetKeyStream
C#
public void AudioTrackSetKeyStream(int trackIdx, int keyIdx, Resource stream);

Sets the stream of the key identified by key_idx to value stream. The track_idx must be the index of an Audio Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
streamResource—
AudioTrackSetUseBlendvoid
# AudioTrackSetUseBlend
C#
public void AudioTrackSetUseBlend(int trackIdx, bool enable);

Sets whether the track will be blended with other animations. If true, the audio playback volume changes depending on the blend value.

Parameters
NameTypeDefault
trackIdxint—
enablebool—
BezierTrackGetKeyInHandleVector2
# BezierTrackGetKeyInHandle
C#
public Vector2 BezierTrackGetKeyInHandle(int trackIdx, int keyIdx);

Returns the in handle of the key identified by key_idx. The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns Vector2
BezierTrackGetKeyOutHandleVector2
# BezierTrackGetKeyOutHandle
C#
public Vector2 BezierTrackGetKeyOutHandle(int trackIdx, int keyIdx);

Returns the out handle of the key identified by key_idx. The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns Vector2
BezierTrackGetKeyValuefloat
# BezierTrackGetKeyValue
C#
public float BezierTrackGetKeyValue(int trackIdx, int keyIdx);

Returns the value of the key identified by key_idx. The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns float
BezierTrackInsertKeyint
# BezierTrackInsertKey
C#
public int BezierTrackInsertKey(int trackIdx, double time, float value, Vector2? inHandle = default, Vector2? outHandle = default);

Inserts a Bezier Track key at the given time in seconds. The track_idx must be the index of a Bezier Track. in_handle is the left-side weight of the added Bezier curve point, out_handle is the right-side one, while value is the actual value at this point.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
valuefloat—
inHandleVector2?default
outHandleVector2?default
inHandle

If the parameter is null, then the default value is new Vector2(0.0f, 0.0f).

outHandle

If the parameter is null, then the default value is new Vector2(0.0f, 0.0f).

Returns int
BezierTrackInterpolatefloat
# BezierTrackInterpolate
C#
public float BezierTrackInterpolate(int trackIdx, double time);

Returns the interpolated value at the given time (in seconds). The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
Returns float
BezierTrackSetKeyInHandlevoid
# BezierTrackSetKeyInHandle
C#
public void BezierTrackSetKeyInHandle(int trackIdx, int keyIdx, Vector2 inHandle, float balancedValueTimeRatio = 1f);

Sets the in handle of the key identified by key_idx to value in_handle. The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
inHandleVector2—
balancedValueTimeRatiofloat1f
BezierTrackSetKeyOutHandlevoid
# BezierTrackSetKeyOutHandle
C#
public void BezierTrackSetKeyOutHandle(int trackIdx, int keyIdx, Vector2 outHandle, float balancedValueTimeRatio = 1f);

Sets the out handle of the key identified by key_idx to value out_handle. The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
outHandleVector2—
balancedValueTimeRatiofloat1f
BezierTrackSetKeyValuevoid
# BezierTrackSetKeyValue
C#
public void BezierTrackSetKeyValue(int trackIdx, int keyIdx, float value);

Sets the value of the key identified by key_idx to the given value. The track_idx must be the index of a Bezier Track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
valuefloat—
BlendShapeTrackInsertKeyint
# BlendShapeTrackInsertKey
C#
public int BlendShapeTrackInsertKey(int trackIdx, double time, float amount);

Inserts a key in a given blend shape track. Returns the key index.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
amountfloat—
Returns int
BlendShapeTrackInterpolate2 overloads
# BlendShapeTrackInterpolate · 1/2
C#
public float BlendShapeTrackInterpolate(int trackIdx, double timeSec);

Returns the interpolated blend shape value at the given time (in seconds). The track_idx must be the index of a blend shape track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
Returns float
# BlendShapeTrackInterpolate · 2/2
C#
public float BlendShapeTrackInterpolate(int trackIdx, double timeSec, bool backward = false);

Returns the interpolated blend shape value at the given time (in seconds). The track_idx must be the index of a blend shape track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
backwardboolfalse
Returns float
Clearvoid
# Clear
C#
public void Clear();

Clear the animation (clear all tracks and reset all).

Compressvoid
# Compress
C#
public void Compress(uint pageSize = 8192, uint fps = 120, float splitTolerance = 4f);

Compress the animation and all its tracks in-place. This will make Animation.TrackIsCompressed return true once called on this Animation. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. Note: Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.

Parameters
NameTypeDefault
pageSizeuint8192
fpsuint120
splitTolerancefloat4f
CopyTrackvoid
# CopyTrack
C#
public void CopyTrack(int trackIdx, Animation toAnimation);

Adds a new track to to_animation that is a copy of the given track from this animation.

Parameters
NameTypeDefault
trackIdxint—
toAnimationAnimation—
FindTrackint
# FindTrack
C#
public int FindTrack(EntityPath path, Animation.TrackType type);

Returns the index of the specified track. If the track is not found, return -1.

Parameters
NameTypeDefault
pathEntityPath—
typeAnimation.TrackType—
Returns int
GetLengthdouble
# GetLength
C#
public double GetLength();
Returns double
GetLoopModeAnimation.LoopModeEnum
# GetLoopMode
C#
public Animation.LoopModeEnum GetLoopMode();
Returns Animation.LoopModeEnum
GetMarkerAtTimeStringName
# GetMarkerAtTime
C#
public StringName GetMarkerAtTime(double time);

Returns the name of the marker located at the given time.

Parameters
NameTypeDefault
timedouble—
Returns StringName
GetMarkerColorColor
# GetMarkerColor
C#
public Color GetMarkerColor(StringName name);

Returns the given marker's color.

Parameters
NameTypeDefault
nameStringName—
Returns Color
GetMarkerNamesstring[]
# GetMarkerNames
C#
public string[] GetMarkerNames();

Returns every marker in this Animation, sorted ascending by time.

Returns string[]
GetMarkerTimedouble
# GetMarkerTime
C#
public double GetMarkerTime(StringName name);

Returns the given marker's time.

Parameters
NameTypeDefault
nameStringName—
Returns double
GetNextMarkerStringName
# GetNextMarker
C#
public StringName GetNextMarker(double time);

Returns the closest marker that comes after the given time. If no such marker exists, an empty string is returned.

Parameters
NameTypeDefault
timedouble—
Returns StringName
GetPrevMarkerStringName
# GetPrevMarker
C#
public StringName GetPrevMarker(double time);

Returns the closest marker that comes before the given time. If no such marker exists, an empty string is returned.

Parameters
NameTypeDefault
timedouble—
Returns StringName
GetStepfloat
# GetStep
C#
public float GetStep();
Returns float
GetTrackCountint
# GetTrackCount
C#
public int GetTrackCount();

Returns the amount of tracks in the animation.

Returns int
HasMarkerbool
# HasMarker
C#
public bool HasMarker(StringName name);

Returns true if this Animation contains a marker with the given name.

Parameters
NameTypeDefault
nameStringName—
Returns bool
IsCaptureIncludedbool
# IsCaptureIncluded
C#
public bool IsCaptureIncluded();
Returns bool
MethodTrackGetNameStringName
# MethodTrackGetName
C#
public StringName MethodTrackGetName(int trackIdx, int keyIdx);

Returns the method name of a method track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns StringName
MethodTrackGetParamsReckfell.Collections.Array
# MethodTrackGetParams
C#
public Reckfell.Collections.Array MethodTrackGetParams(int trackIdx, int keyIdx);

Returns the arguments values to be called on a method track for a given key in a given track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns Reckfell.Collections.Array
Optimizevoid
# Optimize
C#
public void Optimize(float allowedVelocityErr = 0.01f, float allowedAngularErr = 0.01f, int precision = 3);

Optimize the animation and all its tracks in-place. This will preserve only as many keys as are necessary to keep the animation within the specified bounds.

Parameters
NameTypeDefault
allowedVelocityErrfloat0.01f
allowedAngularErrfloat0.01f
precisionint3
PositionTrackInsertKeyint
# PositionTrackInsertKey
C#
public int PositionTrackInsertKey(int trackIdx, double time, Vector3 position);

Inserts a key in a given 3D position track. Returns the key index.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
positionVector3—
Returns int
PositionTrackInterpolate2 overloads
# PositionTrackInterpolate · 1/2
C#
public Vector3 PositionTrackInterpolate(int trackIdx, double timeSec);

Returns the interpolated position value at the given time (in seconds). The track_idx must be the index of a 3D position track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
Returns Vector3
# PositionTrackInterpolate · 2/2
C#
public Vector3 PositionTrackInterpolate(int trackIdx, double timeSec, bool backward = false);

Returns the interpolated position value at the given time (in seconds). The track_idx must be the index of a 3D position track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
backwardboolfalse
Returns Vector3
RemoveMarkervoid
# RemoveMarker
C#
public void RemoveMarker(StringName name);

Removes the marker with the given name from this Animation.

Parameters
NameTypeDefault
nameStringName—
RemoveTrackvoid
# RemoveTrack
C#
public void RemoveTrack(int trackIdx);

Removes a track by specifying the track index.

Parameters
NameTypeDefault
trackIdxint—
RotationTrackInsertKeyint
# RotationTrackInsertKey
C#
public int RotationTrackInsertKey(int trackIdx, double time, Quaternion rotation);

Inserts a key in a given 3D rotation track. Returns the key index.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
rotationQuaternion—
Returns int
RotationTrackInterpolate2 overloads
# RotationTrackInterpolate · 1/2
C#
public Quaternion RotationTrackInterpolate(int trackIdx, double timeSec);

Returns the interpolated rotation value at the given time (in seconds). The track_idx must be the index of a 3D rotation track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
Returns Quaternion
# RotationTrackInterpolate · 2/2
C#
public Quaternion RotationTrackInterpolate(int trackIdx, double timeSec, bool backward = false);

Returns the interpolated rotation value at the given time (in seconds). The track_idx must be the index of a 3D rotation track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
backwardboolfalse
Returns Quaternion
ScaleTrackInsertKeyint
# ScaleTrackInsertKey
C#
public int ScaleTrackInsertKey(int trackIdx, double time, Vector3 scale);

Inserts a key in a given 3D scale track. Returns the key index.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
scaleVector3—
Returns int
ScaleTrackInterpolate2 overloads
# ScaleTrackInterpolate · 1/2
C#
public Vector3 ScaleTrackInterpolate(int trackIdx, double timeSec);

Returns the interpolated scale value at the given time (in seconds). The track_idx must be the index of a 3D scale track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
Returns Vector3
# ScaleTrackInterpolate · 2/2
C#
public Vector3 ScaleTrackInterpolate(int trackIdx, double timeSec, bool backward = false);

Returns the interpolated scale value at the given time (in seconds). The track_idx must be the index of a 3D scale track. Note: If backward is true, the keys are retrieved on the reversed timeline. See also Animation.ValueTrackInterpolate.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
backwardboolfalse
Returns Vector3
SetLengthvoid
# SetLength
C#
public void SetLength(double timeSec);
Parameters
NameTypeDefault
timeSecdouble—
SetLoopModevoid
# SetLoopMode
C#
public void SetLoopMode(Animation.LoopModeEnum loopMode);
Parameters
NameTypeDefault
loopModeAnimation.LoopModeEnum—
SetMarkerColorvoid
# SetMarkerColor
C#
public void SetMarkerColor(StringName name, Color color);

Sets the given marker's color.

Parameters
NameTypeDefault
nameStringName—
colorColor—
SetStepvoid
# SetStep
C#
public void SetStep(float sizeSec);
Parameters
NameTypeDefault
sizeSecfloat—
TrackFindKey2 overloads
# TrackFindKey · 1/2
C#
public int TrackFindKey(int trackIdx, double time, Animation.FindMode findMode);

Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. If limit is true, it does not return keys outside the animation range. If backward is true, the direction is reversed in methods that rely on one directional processing. For example, in case find_mode is Animation.FindMode.Nearest, if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if backward is true, the first key found is retrieved after the position.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
findModeAnimation.FindMode—
Returns int
# TrackFindKey · 2/2
C#
public int TrackFindKey(int trackIdx, double time, Animation.FindMode findMode = Animation.FindMode.Nearest, bool limit = false, bool backward = false);

Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. If limit is true, it does not return keys outside the animation range. If backward is true, the direction is reversed in methods that rely on one directional processing. For example, in case find_mode is Animation.FindMode.Nearest, if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if backward is true, the first key found is retrieved after the position.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
findModeAnimation.FindModeAnimation.FindMode.Nearest
limitboolfalse
backwardboolfalse
Returns int
TrackGetInterpolationLoopWrapbool
# TrackGetInterpolationLoopWrap
C#
public bool TrackGetInterpolationLoopWrap(int trackIdx);

Returns true if the track at track_idx wraps the interpolation loop. New tracks wrap the interpolation loop by default.

Parameters
NameTypeDefault
trackIdxint—
Returns bool
TrackGetInterpolationTypeAnimation.InterpolationType
# TrackGetInterpolationType
C#
public Animation.InterpolationType TrackGetInterpolationType(int trackIdx);

Returns the interpolation type of a given track.

Parameters
NameTypeDefault
trackIdxint—
Returns Animation.InterpolationType
TrackGetKeyCountint
# TrackGetKeyCount
C#
public int TrackGetKeyCount(int trackIdx);

Returns the number of keys in a given track.

Parameters
NameTypeDefault
trackIdxint—
Returns int
TrackGetKeyTimedouble
# TrackGetKeyTime
C#
public double TrackGetKeyTime(int trackIdx, int keyIdx);

Returns the time at which the key is located.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns double
TrackGetKeyTransitionfloat
# TrackGetKeyTransition
C#
public float TrackGetKeyTransition(int trackIdx, int keyIdx);

Returns the transition curve (easing) for a specific key (see the built-in math function @GlobalScope.ease).

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns float
TrackGetKeyValueVariant
# TrackGetKeyValue
C#
public Variant TrackGetKeyValue(int trackIdx, int keyIdx);

Returns the value of a given key in a given track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
Returns Variant
TrackGetPathEntityPath
# TrackGetPath
C#
public EntityPath TrackGetPath(int trackIdx);

Gets the path of a track. For more information on the path format, see Animation.TrackSetPath.

Parameters
NameTypeDefault
trackIdxint—
Returns EntityPath
TrackGetTypeAnimation.TrackType
# TrackGetType
C#
public Animation.TrackType TrackGetType(int trackIdx);

Gets the type of a track.

Parameters
NameTypeDefault
trackIdxint—
Returns Animation.TrackType
TrackInsertKeyint
# TrackInsertKey
C#
public int TrackInsertKey(int trackIdx, double time, Variant key, float transition = 1f);

Inserts a generic key in a given track. Returns the key index.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
keyVariant—
transitionfloat1f
Returns int
TrackIsCompressedbool
# TrackIsCompressed
C#
public bool TrackIsCompressed(int trackIdx);

Returns true if the track is compressed, false otherwise. See also Animation.Compress.

Parameters
NameTypeDefault
trackIdxint—
Returns bool
TrackIsEnabledbool
# TrackIsEnabled
C#
public bool TrackIsEnabled(int trackIdx);

Returns true if the track at index track_idx is enabled.

Parameters
NameTypeDefault
trackIdxint—
Returns bool
TrackIsImportedbool
# TrackIsImported
C#
public bool TrackIsImported(int trackIdx);

Returns true if the given track is imported. Else, return false.

Parameters
NameTypeDefault
trackIdxint—
Returns bool
TrackMoveDownvoid
# TrackMoveDown
C#
public void TrackMoveDown(int trackIdx);

Moves a track down.

Parameters
NameTypeDefault
trackIdxint—
TrackMoveTovoid
# TrackMoveTo
C#
public void TrackMoveTo(int trackIdx, int toIdx);

Changes the index position of track track_idx to the one defined in to_idx.

Parameters
NameTypeDefault
trackIdxint—
toIdxint—
TrackMoveUpvoid
# TrackMoveUp
C#
public void TrackMoveUp(int trackIdx);

Moves a track up.

Parameters
NameTypeDefault
trackIdxint—
TrackRemoveKeyvoid
# TrackRemoveKey
C#
public void TrackRemoveKey(int trackIdx, int keyIdx);

Removes a key by index in a given track.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
TrackRemoveKeyAtTimevoid
# TrackRemoveKeyAtTime
C#
public void TrackRemoveKeyAtTime(int trackIdx, double time);

Removes a key at time in a given track.

Parameters
NameTypeDefault
trackIdxint—
timedouble—
TrackSetEnabledvoid
# TrackSetEnabled
C#
public void TrackSetEnabled(int trackIdx, bool enabled);

Enables/disables the given track. Tracks are enabled by default.

Parameters
NameTypeDefault
trackIdxint—
enabledbool—
TrackSetImportedvoid
# TrackSetImported
C#
public void TrackSetImported(int trackIdx, bool imported);

Sets the given track as imported or not.

Parameters
NameTypeDefault
trackIdxint—
importedbool—
TrackSetInterpolationLoopWrapvoid
# TrackSetInterpolationLoopWrap
C#
public void TrackSetInterpolationLoopWrap(int trackIdx, bool interpolation);

If true, the track at track_idx wraps the interpolation loop.

Parameters
NameTypeDefault
trackIdxint—
interpolationbool—
TrackSetInterpolationTypevoid
# TrackSetInterpolationType
C#
public void TrackSetInterpolationType(int trackIdx, Animation.InterpolationType interpolation);

Sets the interpolation type of a given track.

Parameters
NameTypeDefault
trackIdxint—
interpolationAnimation.InterpolationType—
TrackSetKeyTimevoid
# TrackSetKeyTime
C#
public void TrackSetKeyTime(int trackIdx, int keyIdx, double time);

Sets the time of an existing key.

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
timedouble—
TrackSetKeyTransitionvoid
# TrackSetKeyTransition
C#
public void TrackSetKeyTransition(int trackIdx, int keyIdx, float transition);

Sets the transition curve (easing) for a specific key (see the built-in math function @GlobalScope.ease).

Parameters
NameTypeDefault
trackIdxint—
keyIdxint—
transitionfloat—
TrackSetKeyValuevoid
# TrackSetKeyValue
C#
public void TrackSetKeyValue(int trackIdx, int key, Variant value);

Sets the value of an existing key.

Parameters
NameTypeDefault
trackIdxint—
keyint—
valueVariant—
TrackSetPathvoid
# TrackSetPath
C#
public void TrackSetPath(int trackIdx, EntityPath path);

Sets the track target relative to the mixer RootEntity. Value tracks include a property, such as Visual:position. Specialized Position3D/Rotation3D/Scale3D tracks target an Entity3D or bone path without the property suffix. Engine property strings can differ from C# names.

Parameters
NameTypeDefault
trackIdxint—
pathEntityPath—
TrackSwapvoid
# TrackSwap
C#
public void TrackSwap(int trackIdx, int withIdx);

Swaps the track track_idx's index position with the track with_idx.

Parameters
NameTypeDefault
trackIdxint—
withIdxint—
ValueTrackGetUpdateModeAnimation.UpdateMode
# ValueTrackGetUpdateMode
C#
public Animation.UpdateMode ValueTrackGetUpdateMode(int trackIdx);

Returns the update mode of a value track.

Parameters
NameTypeDefault
trackIdxint—
Returns Animation.UpdateMode
ValueTrackInterpolate2 overloads
# ValueTrackInterpolate · 1/2
C#
public Variant ValueTrackInterpolate(int trackIdx, double timeSec);

Returns the interpolated value at the given time (in seconds). The track_idx must be the index of a value track. If backward is true, the keys are retrieved on the reversed timeline, so the base key is the key after time_sec. This changes the result only for Animation.UpdateMode.Discrete and Animation.InterpolationType.Nearest; the other interpolation types give the same result as forward. Note: AnimationMixer always passes false for continuous tracks with playback API.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
Returns Variant
# ValueTrackInterpolate · 2/2
C#
public Variant ValueTrackInterpolate(int trackIdx, double timeSec, bool backward = false);

Returns the interpolated value at the given time (in seconds). The track_idx must be the index of a value track. If backward is true, the keys are retrieved on the reversed timeline, so the base key is the key after time_sec. This changes the result only for Animation.UpdateMode.Discrete and Animation.InterpolationType.Nearest; the other interpolation types give the same result as forward. Note: AnimationMixer always passes false for continuous tracks with playback API.

Parameters
NameTypeDefault
trackIdxint—
timeSecdouble—
backwardboolfalse
Returns Variant
ValueTrackSetUpdateModevoid
# ValueTrackSetUpdateMode
C#
public void ValueTrackSetUpdateMode(int trackIdx, Animation.UpdateMode mode);

Sets the update mode of a value track.

Parameters
NameTypeDefault
trackIdxint—
modeAnimation.UpdateMode—

Animation.FindMode

ValueDescription
Approx = 1

Finds only the key with approximating the time.

Exact = 2

Finds only the key with matching the time.

Nearest = 0

Finds the nearest time key.

Animation.InterpolationType

ValueDescription
Cubic = 2

Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to Animation.InterpolationType.Linear for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.

CubicAngle = 4

Cubic interpolation with shortest path rotation. Note: The result value is always normalized and may not match the key value.

Linear = 1

Linear interpolation.

LinearAngle = 3

Linear interpolation with shortest path rotation. Note: The result value is always normalized and may not match the key value.

Makima = 5

Modified Akima interpolation. Like Animation.InterpolationType.Cubic, this produces a smooth curve through the keys, but it overshoots less and stays flat where three or more adjacent keys have the same value. It uses two keys on each side of the current segment, so it is slightly more expensive than cubic interpolation.

MakimaAngle = 6

Modified Akima interpolation with shortest path rotation. Note: The result value is always normalized and may not match the key value.

Nearest = 0

No interpolation (nearest value).

Animation.LoopModeEnum

ValueDescription
Linear = 1

At both ends of the animation, the animation will be repeated without changing the playback direction.

None = 0

At both ends of the animation, the animation will stop playing.

Pingpong = 2

Repeats playback and reverse playback at both ends of the animation.

Animation.LoopedFlag

ValueDescription
End = 1

This flag indicates that the animation has reached the end of the animation and just after loop processed.

None = 0

This flag indicates that the animation proceeds without any looping.

Start = 2

This flag indicates that the animation has reached the start of the animation and just after loop processed.

Animation.TrackType

ValueDescription
Animation = 8

Animation tracks play animations in other AnimationPlayer nodes.

Audio = 7

Audio tracks are used to play an audio stream with either type of AudioStreamPlayer. The stream can be trimmed and previewed in the animation.

Bezier = 6

Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a Color).

BlendShape = 4

Blend shape track.

Method = 5

Method tracks call functions with given arguments per key.

Position3D = 1

3D position track (values are stored in Vector3s).

Rotation3D = 2

3D rotation track (values are stored in Quaternions).

Scale3D = 3

3D scale track (values are stored in Vector3s).

Value = 0

Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated Animation.TrackType.Position3D, Animation.TrackType.Rotation3D and Animation.TrackType.Scale3D track types instead of Animation.TrackType.Value is recommended for performance reasons.

Animation.UpdateMode

ValueDescription
Capture = 2

Same as Animation.UpdateMode.Continuous but works as a flag to capture the value of the current object and perform interpolation in some methods. See also AnimationMixer.Capture, AnimationPlayer.PlaybackAutoCapture, and AnimationPlayer.PlayWithCapture.

Continuous = 0

Update between keyframes and hold the value.

Discrete = 1

Update at the keyframes.

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.