Model
self:stop_animation_layer
SharedStops the animation playing on the given layer
Syntax
local status = self:stop_animation_layer(
layer,
blend_time = 0.25,
sync = true
)Parameters
| Type | Name | Description |
|---|---|---|
int | layer | Index of the animation layer to stop |
float | blend_time | Time in seconds to blend out of the animation |
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, "idle")
entity:stop_animation_layer(0)