Collapse Sidebar


When AnimationTrack/Play is called the track’s animation will begin playing and the weight of the animation will increase from 0 to the specified weight (defaults to 1) over the specified fadeTime (defaults to 0.1).

The speed the AnimationTrack will play at is determined by the speed parameter (defaults to 1). When the speed is equal to 1 the number of seconds the track will take to complete is equal to the track’s AnimationTrack/Length property. For example, a speed of 2 will cause the track to play twice as fast.

The weight and speed of the animation can also be changed after the animation has begun playing by using the AnimationTrack/AdjustWeight and AnimationTrack/AdjustSpeed methods.

If the developer wants to start the animation at a specific point using AnimationTrack/TimePosition, it is important the animation is played before this is done.


Name Type Default Description

The duration of time that the animation’s weight should be faded in for.


The weight the animation is to be played at.


The playback speed of the animation.


Return Type Summary

Code Samples

Freeze Animation at Position

The following code sample includes two functions that demonstrate how AdjustSpeed and TimePosition can be used to freeze an animation at a particular point.

The first function freezes an animation at a particular point in time (defined in seconds). The second freezes at it at a percentage (between 0 or 100) by multiplying the percentage by the track length.

As TimePosition can not be used when an AnimationTrack is not playing, the functions check to make sure the animation is playing before proceeding.

Playing Animation for a Specific Duration

The following function will play an AnimationTrack for a specific duration. This is done by changing the speed of the animation to the length of the animation divided by the desired playback duration. This could be used in situations where a developer wants to play a standard animation for different duration (for example, recharging different abilities).