This function pauses an animation. The position will be hold until next play command.
Copy Code | |
---|---|
void PlayToAnimation( int AnimationIndex, float TargetKey, float CurrentKey = -1.0f ); |
AnimationIndex
Type: int
The animation index. Use GetAnimationCount or GetAnimationIndex to query a valid index.
TargetKey
Type: float
The target to to aim for. Use FLT_MAX to target the maximum key. Use -1.0f to use the current target key.
CurrentKey
Type: float
Optional. The current key to start the animation from. Use -1.0f to play from the current animation. Use FLT_MAX to play from the maximum position.
Calling PlayToAnimation( AnimationIndex, -1.0f, -1.0f ) is equal to PlayAnimation( AnimationIndex ).