natiny.mesh.get_animation
natiny.mesh.get_animation(mesh, index) -> animation
Returns one of the clips the file carried, by index.
Parameters
| Name | Type | Description |
|---|---|---|
mesh |
number |
Mesh handle |
index |
integer |
Zero-based clip index, below get_animation_count |
Returns
| Type | Description |
|---|---|
number |
Animation handle; nil for an index past the end |
Example
local first = natiny.mesh.get_animation(hero_mesh, 0)
natiny.animator.play(walker, first)