natiny.animator.get_speed

Lua
natiny.animator.get_speed(animator) -> speed

Returns the multiple of real time this animator's clock runs at.

Parameters

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

Returns

Type Description
number Playback-rate multiplier; 0 for a stale nonzero animator handle

Example

Lua
local speed = natiny.animator.get_speed(hero_legs)
print(string.format("%.2fx", speed))