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