
- get/set the strength (intensity) of the diffuse reflection
- float number
- 0.0 to 1.0
- 0.0 = no diffuse reflection
- 1.0 = maximum diffuse reflection
- Properties menu >> Material >> Diffuse >> Intensity

################## get the intensity of the diffuse reflection
# import bge
import bge
# get the current controller
controller = bge.logic.getCurrentController()
# get object that owns this controller
obj = controller.owner
# There's only one mesh on my model
mesh = obj.meshes[0]
# And only one material on the mesh
mat = mesh.materials[0]
# get diffuse reflection intensity
mat_dif = mat.diffuseIntensity
################## set the intensity of the diffuse reflection
# import bge
import bge
# get the current controller
controller = bge.logic.getCurrentController()
# get object that owns this controller
obj = controller.owner
# There's only one mesh on my model
mesh = obj.meshes[0]
# And only one material on the mesh
mat = mesh.materials[0]
# set diffuse reflection intensity
mat.diffuseIntensity = 0.5