quat_attenuation
quat_attenuation
get/set the quadratic component of the light's attenuation.
SPOT and NORMAL (lamp) lights only
Type: float from 0.0 to 1.0
Sample Code
######################## get light quat_attenuation
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named Lamp
light = lightList["OBLamp"]
# get quad component
falloff = light.quat_attenuation
######################## set light quat_attenuation
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named Lamp
light = lightList["OBLamp"]
# set the quad component
light.quat_attenuation = 0.5
|