natiny_animator_seek
void natiny_animator_seek(NatinyAnimator animator, float seconds);
Moves the clip to a moment, without starting or stopping the clock.
Parameters
| Name | Type | Description |
|---|---|---|
animator |
NatinyAnimator |
Animator handle from natiny_animator_create |
seconds |
float |
Where to move to, clamped to [0, duration] |
Example
NatinyAnimation clip = natiny_animator_get_animation(hero_legs);
natiny_animator_seek(hero_legs, natiny_animation_get_duration(clip) * 0.5f);