Links |
---|
Specifies model lighting.
Model:SetLight(enabled[, omni, dirX,dirY,dirZ, ambIntensity[,ambR,ambG,ambB[, dirIntensity[,dirR,dirG,dirB]]]])]]
Arguments
- enabled
- Boolean - appears to be true for lit and false for unlit.
- omni
- Boolean - If the light is omnidirectional [lighting in all directions] (defaults to false)
- dirX, dirY, dirZ
- Number - vector from the origin to where the light source should face.
- ambIntensity
- Number - intensity of the ambient component of the light source.
- ambR, ambG, ambB
- Number - color of the ambient component of the light source (0-1)
- dirIntensity
- Number - intensity of the direct component of the light source.
- dirR, dirG, dirB
- Number - color of the direct component of the light source (0-1)
Notes
- It seems that the direct component only influences the specularity.
- The dir-vector is only used to determine the direction that the light source faces; its distance from the mesh does not affect the light level.