getLightTangent
Client
Reads where a rect light's width points.
vec3|false getLightTangent(light light)
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The 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.