When slowing time down in the BGE, I would like all lights in the current scene to redshift and their energy levels to drop by half, thus simulating the Doppler effect. Then, if time speeds up, the lights get brighter and bluer, thus simulating the blueshift effect. How can I achieve this? I have already achieved slow motion, so how to recreate the light Doppler effect? Thanks!
you can animate the light
You can get/set a time with the following Python methods:
You can get/set a lamp’s color and energy with the following Python methods:
KX_LightObject.energy = 1.0
KX_LightObject.color = [1,0,0]
I mean ALL lights in a scene through Python. Not just one individual light. All of them. And it gets it through like scene.lights or something.
import bge scene = bge.logic.getCurrentScene() for light in scene.lights: light.energy = 0.5 light.color = [1,0,0]