setAnimationCurrentTime

Script::setAnimationCurrentTime

Sets the current playing time of an Animation played by an Entity.

Declaration

void setAnimationCurrentTime(Entity entity, float newTime);

Parameters

Name

Type

Description

entity

Entity

The Entity the Animation is played on. It must have a Renderable Component.

newTime

float

The time to set the current Animation to.

Returns

None.

Notes

If newTime is greater than the current’s Animation’s duration, the animation stops, unless the animation is looping.