natiny.animator.set_speed

Lua
natiny.animator.set_speed(animator, speed)

Sets how fast the clip's clock runs, as a multiple of real time.

Parameters

Name Type Description
animator number Animator handle from natiny.animator.create
speed number 1 is the clip's own pace; 0 freezes it; negative runs it backwards

Example

Lua
--  A run cycle sped up with the character.
natiny.animator.set_speed(hero_legs, ground_speed / WALK_SPEED)