skeleton_animation_set_position

This function will set the animation assigned to the given track to the position you supply. The position should be a real value between 0 and 1. If you supply a value outside of this range, then the track position will be set to the fractional part of that value. Suppose you use a value of 0.4, a value of 1.4, a value of 2.4, ... These will all set the position to 0.4.

 

Syntax:

skeleton_animation_set_position(track, position);

ArgumentTypeDescription
trackRealThe animation track to set the frame of.
positionRealThe new position for the animation frame.

 

 

Returns:

N/A

 

Example:

skeleton_animation_set_position(1, 0.25);

The above code will set the position for track 1 of the skeleton animation to 0.25 or, put differently, at 25% from the start of the animation.