self:get_global_rotation
Client
Retrieves the global rotation of the character body in degrees
Syntax
local rotation = self:get_global_rotation()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
vector3 | rotation | Current global rotation in degrees as {x, y, z} |
Examples
local entity = physics.character.create()
local rotation = entity:get_global_rotation()
core.engine.print("info", "Character body rotation:", util.table.unpack(rotation))