lin_attenuation
lin_attenuation
get/set the linear component of the light's attenuation.
SPOT and NORMAL (lamp) lights only
Type: float from 0.0 to 1.0
Sample Code
########################### get light lin_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 linear component
falloff = light.lin_attenuation
######################## set light lin_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 linear component
light.lin_attenuation = 0.5
|