natiny_animator_play
void natiny_animator_play(NatinyAnimator animator, NatinyAnimation animation, float fade);
Starts a clip from the beginning, optionally cross-fading out of whatever was playing.
Parameters
| Name | Type | Description |
|---|---|---|
animator |
NatinyAnimator |
Animator handle from natiny_animator_create |
animation |
NatinyAnimation |
Clip from the animator model's mesh |
fade |
float |
Cross-fade duration in seconds; values at or below 0.0f switch immediately |
Example
natiny_animator_play(hero_legs, running, 0.2f);
natiny_animator_set_loop(hero_legs, true);
Notes
- The clip must belong to the same mesh the model was built on; one written against another skeleton is refused.