Model

self:set_component_scale

Shared

Sets the local scale of a component on the model

Syntax

local status = self:set_component_scale(
    component,
    scale
)

Parameters

TypeNameDescription
stringcomponentPath of the component to update
vector3scaleScale to apply as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the local scale of a component
core.model.load("character", "models/character.glb")

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

entity:set_component_scale("Skeleton3D/Hat", {1.2, 1.2, 1.2})

On this page