World: mistEnable

mistEnable
  • Enable/disable mist in the BGE

Type:
  • Boolean
Values:
  • Enable mist: True or 1
     
  • Disable mist: False or 0
Mist Enable setting in Blender 3D
  • Properties menu >> World >> Mist checkbox
Sample Code

################  get the mist status

# import bge module
import bge

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

# get the world module
wrld = scene.world

# get the mist status
status = wrld.mistEnable

Sample Code

################  set the mist
# import bge module
import bge

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

# get the world module
wrld = scene.world

# Enable the mist
wrld.mistEnable = True