Model
self:set_animation_layer_weight
SharedSets the blend weight of an animation layer
Syntax
local status = self:set_animation_layer_weight(
layer,
weight,
blend_time = 0,
sync = true
)Parameters
| Type | Name | Description |
|---|---|---|
int | layer | Index of the animation layer to modify |
float | weight | New blend weight of the layer |
float | blend_time | Time in seconds to blend to the new weight |
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(1, "wave")
entity:set_animation_layer_weight(1, 0, 0.5)