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