I've been working on a day/night cycle for this game, and I have everything working so far. The Sun/Moon orbits properly, and the background changes colors smoothly based on the time of day. The only issue is, whenever I switch from night to day, because of the equations I use, there is a bright white flash on the screen for some reason I can't find. Can someone help me make this smoother?
CurrentTime = The current time of day, which is increased every 0.01 seconds via the CurrentTimeScale variable, which at default should be 0.01, but for the sake of testing is sped up to 5.
CurrentTimeScale = (Read above)
CurrentTimeAmount = A decimal based on the percentage of the day completed. One day is 720 (timescalespeedhere) so if the day is at 360 out of 720, then CurrentTimeAmount would read as 0.5...
IsDay is a simple variable to check if it is day or night. Instead of currenttime being 24 "hours" it is split in 'half' at 720 'minutes.'
LastSkyR/G/B are the colorvalues that the background sets its color to.