Make sun/lamp align to location

When I create a sun lamp and rotate the sun to fit with the sky dome it looks like you’d expect it to, with the light reflecting on the water. But this only looks right if I stay near the sun.

If I move the player very far on the X axis, the light cast by the sun does not look right. The shading on the water should line up with the sun like in the first picture.


Is there a way to make this look right?

Attachments



well if you want the lamp to align to a position,


from bge import logic

cont = logic.getCurrentController()
own = cont.owner

own.alignAxisToVect([x,y,z])

Where x,y,z are the position you want the lamp to align to.