Model
self:set_animation_layer_speed
SharedSets the playback speed of an animation layer
Syntax
local status = self:set_animation_layer_speed(
layer,
speed,
sync = true
)Parameters
| Type | Name | Description |
|---|---|---|
int | layer | Index of the animation layer to modify |
float | speed | New playback speed multiplier |
bool | sync | Whether the call is replicated to other peers |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
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)