getLightDirection
Cliente
Lee hacia dónde apunta una luz spot o rect.
vec3|false getLightDirection(light light)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| light | light | La luz. |
Retorno
Un vec3 unitario, o false con un argumento incorrecto.
Mientras la luz está enganchada a otro elemento, la dirección es relativa a él.
Ejemplo
local light = createSpotLight(0, 0, 10, 1, 0, -1)
local dir = getLightDirection(light)
outputDebugString(("%.2f %.2f %.2f"):format(dir.x, dir.y, dir.z))AtenciónSolo para luces spot y rect. En una luz point, registra un aviso y devuelve
false.