Sun position not updating on reflection plane in different scene

Hello everyone… I have the following problem:
So, I have a sun lamp parented to a sphere empty which I can rotate around with the mouse to change the suns position.
This all works fine if I add this “sun system” to the player group instance and then to the scene where it is needed.
But if instead I link the “sun system” (that is the sun model, the sun lamp and the sun rotation empty) to the corresponding scene, the reflection on the water plane is not updated, instead it is always using the same wrong sun position.
For a better understanding I made this example video:

Maybe someone has an idea what’s going on.


Once BGE has started running, the scenes are almost completely independant. As a result you have to sync most data between scenes yourself - probably with python.

I say “almost” because mesh/material data is shared. Object positions, animations, parenting etc. etc. is not.

Or, a gotcha with linking groups is that it creates an empty with no children. So if your script is rotating an object, it may be rotating that empty rather than the empty that is the parent of the sun.

1 Like
import bge
own = bge.logic.getCurrentController().owner

other = bge.logic.getSceneList()['OtherSceneName']

other.objects['Sun_Lamp_overlay'].worldOrientation = own.scene.objects['SunLamp'].worldOrientation
1 Like