# Ray shadows are not correct [duplicate]

I created a simple scene with a plane, a mountain and some trees. I added a sun and selected "Ray shadows", but the shadows are created like if the sun is right above the scene. It's not where I positioned the sun and I even tried different positions, but the shadows never change.
What do I need to do to have working shadows?

Blender v2.79
Blender Render

• What version of Blender are you using? What render engine? Could you post some screenshots? – Duarte Farrajota Ramos Jan 16 '18 at 19:21
• Didn't know I could upload pictures. I'm sorry, edited the post with more infos! – PandaSekh Jan 16 '18 at 19:25
• Have you rotated you sun lamp? Sun lamps are always calculated as if at an infinite distance, unless you give it some rotation their poisition in the scene is irrelevant. – Duarte Farrajota Ramos Jan 16 '18 at 19:27
• Note also that no lamp in Blender Internal will give shadows except Spot unless enabling Ray tracing in Render tab > Shading rollout – Mr Zak Jan 16 '18 at 19:38
• A sun lamp by default points straight down, so yes, unless you rotate it, it will be shining from right above everything. Moreover, regardless of where you place it, it's always calculated from "outside" the scene, at infinite distance. In essence, you can safely leave it at the world origin and control the light/shadows by rotating it. – user27640 Jan 16 '18 at 19:38

The position of the sun has no effect on the direction the light is coming from. This is because the sun light is meant to simulate a light source that is infinitely far away. This gives an effect very close to that given by our actual sun, since the real sun is very far away.