natiny_animator_get_time
float natiny_animator_get_time(NatinyAnimator animator);
Returns how far into its clip the animator is.
Parameters
| Name | Type | Description |
|---|---|---|
animator |
NatinyAnimator |
Animator handle from natiny_animator_create |
Returns
| Type | Description |
|---|---|
float |
Position in the current clip, in seconds; 0.0f for an invalid animator or one without a clip |
Example
float at = natiny_animator_get_time(hero_legs);
NatinyAnimation clip = natiny_animator_get_animation(hero_legs);
float duration = natiny_animation_get_duration(clip);
printf("%.2f / %.2f\n", at, duration);