self:to_global
Client
Converts a local-space position to a global world-space position
Syntax
local global_point = self:to_global(
local_point
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | local_point | Local-space position to convert as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
vector3 | global_point | Resulting world-space position as {x, y, z} |
Examples
local entity = core.camera.create()
entity:set_position({0, 5, 0})
local world_point = entity:to_global({1, 0, 0})
core.engine.print("info", "World point:", util.table.unpack(world_point))