natiny.animator.get_weight

Lua
natiny.animator.get_weight(animator) -> weight

Returns how much of the final pose this layer claims.

Parameters

Name Type Description
animator number Animator handle from natiny.animator.create

Returns

Type Description
number The weight, between 0 and 1; 0 for a stale nonzero animator handle

Example

Lua
local weight = natiny.animator.get_weight(arms)
print(string.format("upper-body blend: %.0f%%", weight * 100))