Model

self:get_component_rotation

Shared

Retrieves the local rotation of a component on the model

Syntax

local rotation = self:get_component_rotation(
    component
)

Parameters

TypeNameDescription
stringcomponentPath of the component to query

Returns

TypeNameDescription
vector3rotationCurrent local rotation of the component in degrees as {x, y, z}

Examples

Get the local rotation of a component
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))

On this page