Model

self:get_animation_layer_speed

Shared

Retrieves the playback speed of an animation layer

Syntax

local speed = self:get_animation_layer_speed(
    layer
)

Parameters

TypeNameDescription
intlayerIndex of the animation layer to query

Returns

TypeNameDescription
floatspeedCurrent playback speed multiplier of the layer

Examples

Get the speed of a layer
core.model.load("character", "models/character.glb")

local entity = core.model.create("character")

core.engine.print("info", "Speed:", entity:get_animation_layer_speed(0))

On this page