ZActionPlayer

Class that allows playback of skeletal actions stored in ZSkeletalAction. Provides playback control such as play, pause, and retrieving the current state of the animation at a specific moment.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Gets the current keyframe based on playback time

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun pause()

Pauses playback

Link copied to clipboard
fun play(loop: Boolean = false)

Starts playing the action

Link copied to clipboard

Resets the internal time counter. Useful when a lot of time has passed since the last update and we don't want a large jump in the animation.

Link copied to clipboard
fun seek(time: Float)

Jumps to a specific point in time

Link copied to clipboard
fun setAction(obj: ZModel, action: ZSkeletalAction)

Sets the action to be played

Link copied to clipboard

Sets the playback speed

Link copied to clipboard
fun stop()

Stops playback and resets the time

Link copied to clipboard
fun update()

Updates the playback state by automatically calculating the time elapsed since the last call.