Model

self:rotate

Shared

Rotates the model around an axis in the parent's coordinate space

Syntax

local status = self:rotate(
    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 model
core.model.load("character", "models/character.glb")

local entity = core.model.create("character")

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

On this page