World: mistDistance

mistDistance
  • Get/set the distance from the camera that the mist becomes solid

Type:
  • float number
Range:
  • 0.00 to 10,000.00
Mist Distance setting in Blender 3D
  • Properties menu >> World >> Mist >> Depth
Sample Code

################  get the mist distance

# import bge module
import bge

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

# get the world module
wrld = scene.world

# get the mist distance
mist_solid = wrld.mistDistance

Sample Code

################  set the mist distance

# import bge module
import bge

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

# get the world module
wrld = scene.world

# set the mist distance to 20
wrld.mistDistance = 20.00