Spot Light
self:to_global
ClientConverts a local-space position to world-space relative to the spot light
Syntax
local world_position = self:to_global(
local_point
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | local_point | Position in local space as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
vector3 | world_position | Equivalent position in world space as {x, y, z} |
Examples
local entity = light.spot.create()
entity:set_position({10, 0, 0})
core.engine.print("info", util.table.unpack(entity:to_global({1, 0, 0})))