How to stop shadows from flying?

I’ve created a sky box that rotates with time and the light intensity also changes to create day and night … the problem is when the sky box rotates … the shadows on the walls start flying
Here is a screen shot.

Your “ground” or whatever the bottom of your level is, is one-sided geometry, and therefore “transparent” from the other side.

Make another extra plane and make it face downwards and place it below your world. This will cast correct shadow across the world when light source is below it, or to simulate it being “unlit”.