Model

self:set_component_global_rotation

Shared

Sets the global rotation of a component on the model

Syntax

local status = self:set_component_global_rotation(
    component,
    rotation
)

Parameters

TypeNameDescription
stringcomponentPath of the component to update
vector3rotationRotation to apply in degrees as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

local entity = core.model.create("character")

entity:set_component_global_rotation("Skeleton3D/Hat", {0, 90, 0})

On this page