UMG, how to change time of day (sun position) with a slider?

Hi guys!

I have been trying to get a working prototype of a slider created in widget BP, to correspond to a Time of Day (TOD) system but to no avail. Can anyone give me some help? So far, I have this created:

My Level Blueprint

My Widget Blueprint

In-game Widget

As you can see above, I want to be able to press spacebar, the slider appears, and i can change the TOD, hit spacebar again and continue back to the game. I have the spacebar thingy set up, so no worries about that. I just need to get the slider to change the TOD. Thank you for the help!

I think you’ll have to create a class of widget that talks to the persistent level.
A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums.

You need the slider position to relate to set actor rotation in the persistent level. I’m not sure how you’d do that without creating your own class of widget…

Hi robbiecooper, thanks for the reply. However I really have no idea how to create a class widget that talks to the level. I did have a look at the link you gave me, but I dont really have scripting background. But I will try it and get back to you. Thanks!

i have done it, I created a class widget, but am stuck now. What do I do with it?

Well done! You’ve created a class of widget btw.

So now take a look at the BP you’re trying to reach. It’s the Sky_Sphere BP and sits in the level. The C++ class that has the level’s functions etc is the levelscriptactor. Follow this tutorial to reparent your level with your own custom levelscriptactor;

I’m unsure if this thread is still active, but I too am looking into developing something of similarity to ghuuu. I am unsure what to do regarding robbiecooper’s last comment as I am very new to C++ working primarily in BP. Can you offer any help?