Model

self:translate_local

Shared

Translates the model by an offset in its own local coordinate space

Syntax

local status = self:translate_local(
    offset
)

Parameters

TypeNameDescription
vector3offsetOffset to translate by as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Translate a model locally
core.model.load("character", "models/character.glb")

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

entity:translate_local({0, 0, -1})

On this page