I have a sphere (world) that I want to reveal the night lights on. I can use a normal node and manually rotate the DOT product, then I use this as a factor mix between Day time shader and Night time shader.
But I want an interactive version so I only have to move the light in 3D view.
I guessed that maybe I could take the Lamp's position as a driver value and modify the position normal of my sphere. See screeny:
But I can't figure the math to take all angles into account.