natiny.animator.seek

Lua
natiny.animator.seek(animator, seconds)

Moves the clip to a moment, without starting or stopping the clock.

Parameters

Name Type Description
animator number Animator handle from natiny.animator.create
seconds number Position in seconds, clamped to [0, duration]

Example

Lua
local clip = natiny.animator.get_animation(hero_legs)
natiny.animator.seek(hero_legs, natiny.animation.get_duration(clip) * 0.5)