Sunday, October 30, 2022
HomeGame Developmentlighting - How can I modify the default daybreak and nightfall occasions...

lighting – How can I modify the default daybreak and nightfall occasions in Unity?


I am engaged on a sport by which the season is especially vital 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 similar occasions; whereas, in the true world, days get longer into the summer time and shorter into the winter.

The entire thing mainly entails rotating a directional mild now; however apart from altering the speed of rotation of the sunshine in a non-linear vogue, I am undecided the best way to implement the day-length-per-day-of-year system. Earlier than I do one thing like that, I am unable to 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 in some unspecified time in the future in my sport. Is there an environment friendly or built-in manner of managing this?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments