Model

self:translate

Shared

Translates the model by an offset in the parent's coordinate space

Syntax

local status = self:translate(
    offset
)

Parameters

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

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

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

entity:translate({0, 1, 0})

On this page