Model

self:set_animation_layer_speed

Shared

Sets the playback speed of an animation layer

Syntax

local status = self:set_animation_layer_speed(
    layer,
    speed,
    sync = true
)

Parameters

TypeNameDescription
intlayerIndex of the animation layer to modify
floatspeedNew playback speed multiplier
boolsyncWhether the call is replicated to other peers

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Slow a layer down to half speed
core.model.load("character", "models/character.glb")

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

entity:play_animation_layer(0, "walk")
entity:set_animation_layer_speed(0, 0.5)

On this page