Model

self:get_component_global_scale

Shared

Retrieves the global scale of a component on the model

Syntax

local scale = self:get_component_global_scale(
    component
)

Parameters

TypeNameDescription
stringcomponentPath of the component to query

Returns

TypeNameDescription
vector3scaleCurrent global scale of the component as {x, y, z}

Examples

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

local entity = core.model.create("character")
local scale = entity:get_component_global_scale("Skeleton3D/Hat")

core.engine.print("info", "Component scale:", util.table.unpack(scale))

On this page