0
$\begingroup$

I was wondering if possible to retrieve and change World properties in-game, especially the horizon_color.

$\endgroup$

1 Answer 1

1
$\begingroup$

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]
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.