Model

self:to_global

Shared

Converts a local-space point into the model's world coordinate space

Syntax

local global_point = self:to_global(
    local_point
)

Parameters

TypeNameDescription
vector3local_pointLocal-space point to convert as {x, y, z}

Returns

TypeNameDescription
vector3global_pointConverted point in world space as {x, y, z}

Examples

Convert a point to world space
core.model.load("character", "models/character.glb")

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

core.engine.print("info", entity:to_global({0, 0, 1}))

On this page