self:set_rotation

Shared

Sets the rotation of the model in 3D world-space


Syntax

local status = self:set_rotation(
    rotation
)

Parameters

TypeNameDescription
vector3rotation3D world-space rotation to apply to the model, as {x, y, z} (in degrees)

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Rotate a model 25 degrees on the Y axis
local entity = core.model.create("character")

entity:set_rotation({0, 25, 0})

On this page