Light: shadowBias

shadowBias
  • Returns the amount the shadow is moved away from the shadow-casting object

Return Type: 
  • float number
Range:
  • 0.001 to 5.000
Shadows work with Spot and Sun lamps
  • Properties menu >> Object Data  >> Shadow checkbox
Shadow Bias in Blender 3D
  • Properties menu >> Object Data >> Shadow >> Quality >> Bias
Sample Code

################## get the shadow bias
 
# import bge
import bge

# get current scene
scene = bge.logic.getCurrentScene()

# get a list of the lights in the scene
lightList = scene.lights

# get the spotlight named Spot_Light
light = lightList["Spot_Light"]

# get shadow bias
bias_Shadow = light.shadowBias