natiny.model.get_bone_at

Lua
natiny.model.get_bone_at(model, index) -> bone

Returns one bone of this model as an entity, by index rather than by name.

Parameters

Name Type Description
model number Model handle
index integer Zero-based bone index, below get_bone_count

Returns

Type Description
number Entity handle for the bone, or nil past the end

Example

Lua
local root = natiny.model.get_bone_at(hero, 0)