I was wondering if possible to retrieve and change World properties in-game, especially the horizon_color.
1 Answer
I'm not sure if this is what you want:
import bge
scene = bge.logic.getCurrentScene()
# background
saveit = scene.world.backgroundColor
scene.world.backgroundColor = [r,g,b]
# ambient light
scene.world.ambientColor = [r,g,b]
With r,g,b
float values from 0 to 1.
If you have mist enabled, you should also do:
# mist color
scene.world.mistColor = [r,g,b]