self:to_global

Client

Converts a local-space point into the vehicle body'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
local entity = physics.vehicle.create()

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

On this page