self:get_rotation

Shared

Retrieves the current rotation of the model in 3D world-space


Syntax

local rotation = self:get_rotation()

Parameters

No parameters are accepted by this function

Returns

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

Examples

Get the world-space rotation of a model
local entity = core.model.create("character")
local rotation = entity:get_rotation()

core.engine.print("info", "Model rotation:", util.table.unpack(rotation))

On this page