Day / Night Cycle continues while game is paused

Hi there, I have been using this asset for a while now from the market, Good Sky, specifically for it’s gorgeous and easy to use day/night cycle.

My problem is that using the built in UE5 pause node (Set Game Paused) seems to indeed freeze the cycle when the game pauses, just like I want it to, but when I unpause the sun/moon instantly jumps to where It would be if it kept rotating while the game was paused.

I have looked over the way the code is done (the asset is a single BP), like most day/night cycles it controls things through a rotation on the level’s direction light, but I can’t seem to figure out why the sun/moon would keep rotating “invisibly” while the game is paused.

I already made a system to save the time of day and resume on load from where it was so I would really like to not have to find an alternative, has anyone else had this problem and/or would you be willing to help?

The main problem, is that GS uses real time. So when you unpause, it carries on from where the real time is.

You need to change this in the code

Use game time instead of realtime.

Just use your normal pause code :slight_smile:

2 Likes

Hey there @Stalker.1! Welcome to the community! Sounds like the plugin is using your system time, you’ll have to find out where that is in the BP and change it.

Edit: Just as Clockwork get’s in hahaha good work.

2 Likes