Community Tutorial: Creating a Flexible Day Night Cycle with Curves

In this tutorial, we’re going to learn how you can create a flexible day-night cycle leveraging the power of Curves.

https://dev.epicgames.com/community/learning/tutorials/Gpqd/unreal-engine-creating-a-flexible-day-night-cycle-with-curves

Hey LenNerd!

I found your guide while looking around for some help doing this based off a curve so that the sky doesn’t just go black. Dawn and Dusk.

I am having a few issues following your guide. I am brand new to coding so I reckon it is my inexperience. I am having issues particularly with the logic for the rotation function. The guide skips right over the SET node after the function, what exactly is it I am setting there, and where does the “Light to Rotate” input pin come from. I have tried both my variables but neither have that “Light to Rotate” pin. Thank you so much for your time!

Hey there! Thanks for checking out my tutorial :slight_smile:
The “Light to Rotate” variable is a local variable set right at the start of the “Rotate Light” function. It’s set to the value of the “Light” input. This is a method I use to keep my connections organized. I can just reference the local variable instead of having to drag lines from the Light input variable, but you can also do that. It’s really just personal taste.

I hope this cleared things up! If you have any other questions, post them here. I’d be happy to answer them :slight_smile: