I’m trying to get a day/night cycle in my game by making the directional light constantly rotate. I was dealing with a pretty common issue of the sun still lighting up my scene from underneath the map and I heard one solution was to basically turn off the light as it goes down and turn it back on right as it’s coming up.
You can see in my clamp that 0 intensity is for night time, and I found 5 intensity good for day time. The problem is that the SunIntensity variable is NOT clamped between 0 and 5. test after test the number goes up and down when it’s supposed to, and then it keeps going way out of the range.
If I have to I can just set it to equal exactly 0 or 5 but I was thinking a gradual change would be better. I also can confirm these are the only two nodes changing my SunIntensity variable.
Why are my clamps doing nothing?