cycle day night with clock

I was following a tutorial to make a day and night cycle with clock but when I modified the speed avriable, it stopped working well, I’m giving you the video and the screenshots to see if you know how to fix it




When you change the number, the speed decreases, the night lasts too long and the day lasts too little.

1 Like

I’m assuming it’s because you’re not adjusting the speed of the timeline.

If you want things to go twice as fast, the timeline also has to run twice as fast. You can use the ‘set play rate’ on the timeline component to do this, rather than editing the actual timeline.

1 Like

I have tried changing the timeline values ​​and everything remains the same

1 Like

What is the standard speed, and what speed are you using when it goes nuts?

In the tutorial the speed variable was 10 and I changed it to 1 because in my game I want it to go a little slower but then with 1 the day lasts very little and the night lasts too long.

1 Like

Ok, I was going to take a look, but this is UE4, right?

All you need in UE5, is this

I don’t understand why there is a timeline to fade the sun and skylight, but also an event to turn them on and off? I do also see a lot of people complaining it doesn’t work correctly in the comments.

You could get a copy of good sky, it works with UE4 and does this all for you, I think…

https://www.unrealengine.com/marketplace/en-US/product/good-sky

1 Like

I’m going to try the good sky

1 Like

How could I make a clock based on where the sun is?

It’s related to the Y rotation of the light actor. Sorry, not at a machine rn… :slight_smile:

Just realized, this my not be the case with Good Sky. But there will be something like that, and you can map it to 0-24 hrs.

1 Like

I have been trying several tutorials on this and in all of them the sun is bugged at -90, I realized that I only need the cycle of the sun, the night cycle does not matter to me for my game but the sun is bugged :melting_face:

It could be to do with gimbal lock, you can’t always just compare one axis.

But the change of time of day works with GS, right?

1 Like

If it happens to someone that they freeze at 90 or less -90, I added a value to the x or z and it solved it for me.
image

1 Like

:blush: :+1:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.