self:rotate_local

Client

Rotates the character body around an axis in its own local coordinate space


Syntax

local status = self:rotate_local(
    axis,
    degrees
)

Parameters

TypeNameDescription
vector3axisAxis to rotate around as {x, y, z}
floatdegreesAngle to rotate by in degrees

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Rotate a character body locally
local entity = physics.character.create()

entity:rotate_local({0, 1, 0}, 45)

On this page