Model
self:set_component_quaternion
SharedSets the local rotation of a component on the model using a quaternion
Syntax
local status = self:set_component_quaternion(
component,
quaternion
)Parameters
| Type | Name | Description |
|---|---|---|
string | component | Path of the component to update |
quaternion | quaternion | Rotation to apply as {x, y, z, w} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
core.model.load("character", "models/character.glb")
local entity = core.model.create("character")
entity:set_component_quaternion("Skeleton3D/Hat", {0, 0, 0, 1})