self:to_local

Client

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


Syntax

local local_point = self:to_local(
    global_point
)

Parameters

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

Returns

TypeNameDescription
vector3local_pointConverted point in local space as {x, y, z}

Examples

Convert a point to local space
local entity = physics.character.create()

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

On this page