[ad_1]
I’m engaged on a sport during which the season is especially essential to the participant, together with daylight. It progresses from early spring to late fall. I’ve a really primary day/night time cycle system working, however daybreak and nightfall are persistently on the identical occasions; whereas, in the true world, days get longer into the summer season and shorter into the winter.
The complete factor mainly includes rotating a directional mild now; however apart from altering the speed of rotation of the sunshine in a non-linear trend, I’m undecided learn how to implement the day-length-per-day-of-year system. Before I do one thing like that, I can not assist however really feel like there have to be a greater approach to do it.
In abstract, if I have not been clear, dawn and sundown are 6AM and 6PM (mapped to a normalized angle) by default. I may have dawn at 5AM and sundown as late as 9PM sooner or later in my sport. Is there an environment friendly or built-in method of managing this?
[ad_2]