Direction of light to mask part of the sphere

Hi guys.
I am trying to figure out a best approach to mask part of my sphere based on relative position to Sun. Below image explains what I am planning to achieve. I played with material blueprint and it partially works when Planet is in one position but as soon I start rotating the planet around orbit it is not consistent.

Yupi, found a solution to my exact problem.
Clamp results go into emission.

2 Likes