Model
self:get_component_scale
SharedRetrieves the local scale of a component on the model
Syntax
local scale = self:get_component_scale(
component
)Parameters
| Type | Name | Description |
|---|---|---|
string | component | Path of the component to query |
Returns
| Type | Name | Description |
|---|---|---|
vector3 | scale | Current local scale of the component as {x, y, z} |
Examples
core.model.load("character", "models/character.glb")
local entity = core.model.create("character")
local scale = entity:get_component_scale("Skeleton3D/Hat")
core.engine.print("info", "Component scale:", util.table.unpack(scale))