- Documentation
- Server functions
- setLightDirection
Function
setLightDirection
Changes the spot light direction (a vector, e.g. 0, 0, -1 = down).
Syntax
bool setLightDirection(element theLight, float x, float y, float z)Arguments
theLightelement- The light.
xfloat- X component.
yfloat- Y component.
zfloat- Z component.
Returns
true on success.
Example
local lamp = createLight(1, 0, 0, 5)
setLightDirection(lamp, 0, 0, -1)