Model

self:get_animation_layer_weight

Shared

Retrieves the blend weight of an animation layer

Syntax

local weight = self:get_animation_layer_weight(
    layer
)

Parameters

TypeNameDescription
intlayerIndex of the animation layer to query

Returns

TypeNameDescription
floatweightCurrent blend weight of the layer

Examples

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

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

core.engine.print("info", "Weight:", entity:get_animation_layer_weight(0))

On this page