UMG Slider not clamping

Hey seems like a dumb issue but I’ve been working on a project that involves a day and night cycle for a small city. I’ve created the day and night cycle to work on the slider but can’t figure out how to clamp the slider so the top is Day and the Bottom is night.

If I click and drag the circle on the slider it continues to loop through the day and night cycles even when the mouse is past the lowest point on the bar.

It seems like no matter what number I set the clamp to it continues to cycle to it continues past the number.

264840-ue1.png

Can you share a bit more about how that widget blueprint is set up? Based on the screenshot you shared, I can’t see any issues, which means the problem is probably hiding elsewhere.

Yeah sure, I’ve just created a simple cast that calls the BP_Sky_Sphere and the Directional Light that’s in the current level. Added a local rotation.

The cycle works, It just isn’t clamping to the correct range.
I’ve attached the full blueprint:

This is all in the graph editor for the UMG UI

It looks like your issue is caused by the use of the Add Actor Local Rotation node, which is going to continuously add more and more rotation to your light every time it is called up.

I think what you need is the Set Actor Rotation node, or perhaps the Set Actor Relative Rotation node if you want to keep the light’s rotation relative to its parent.

Give one of those a shot and let me know if you’re still having the issue.

Heyy! Thanks so much works like a charm!