spotsize
spotsize
get/set the cone angle of the spot light.
Type: float
Range: 1 to 180 degrees
Sample Code
######################### get cone angle of spotlight
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named SpotLight
light = lightList["OBSpotLight"]
# get the cone angle of the spotlight
angle = light.spotsize
######################### set cone angle of spotlight
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named SpotLight
light = lightList["OBSpotLight"]
# set the cone angle
light.spotsize = 50.0
|