Day and night cycle


The Problem:

I needed a day and night cycle that would also stop at a certain time at night, this way the player can still see even after the day is over. This will allow the player to get more things done at night. I was having problems getting the directional light to stop moving at a certain time.

The Problem Solution:

The solution to this was I needed to go about this in a different way. I had to make a daytime variable to check rather it is daytime or not, as well as a variable that is counted as time. After changing the implementation, I managed to get the light to stop by making the rotation speed 0 when the time variable hits a certain number.

Get Breadwinner: Sandwich Master

Leave a comment

Log in with itch.io to leave a comment.