M MY Multiplayer: Wiki
Side
Kind

getLightTangent

Client

Reads where a rect light's width points.

vec3|false getLightTangent(light light)

Parameters

NameTypeDescription
lightlightThe light.

Returns

A unit vec3, or false with a wrong argument.

While the light is attached to another element, the tangent is relative to it.

Example

local light = createRectLight(0, 0, 5, 0, -1, 0)
local tangent = getLightTangent(light)
outputDebugString(("%.2f %.2f %.2f"):format(tangent.x, tangent.y, tangent.z))
NoteRect lights only. On a point or spot light it logs a warning naming its type and returns false.

See also