World: mistType

mistType
  • Get/set the way the mist amount changes

Return Values:
  • 0 = Quadratic
     
  • 1 = Linear
     
  • 2 = Inverse Quadratic
Set Values:
  • Quadratic = 0 or bge.logic.getCurrentScene().world.KX_MIST_QUADRATIC
     
  • Linear = 1 or bge.logic.getCurrentScene().world.KX_MIST_LINEAR
     
  • Inverse Quadratic = 2 or bge.logic.getCurrentScene().world.KX_MIST_INV_QUADRATIC
Mist Type setting in Blender 3D
  • Properties menu >> World >> Mist >> Falloff
Sample Code

################  get the mist falloff type

# import bge module
import bge

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

# get the world module
wrld = scene.world

# get the mist falloff type
mist_falloff = wrld.mistType

Sample Code

################  set the mist falloff type

# import bge module
import bge

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

# get the world module
wrld = scene.world

# set the mist falloff type
wrld.mistType = wrld.KX_MIST_LINEAR