Making text follow handle in slider UMG Widget

I’ve never tried this before, but I have an idea.

In the Widget’s Tick event,
you can get the X position of the slider handle and then set the x position of the text object to be the same. This might not give you the exact results you want if the text and slider handle are inside of different slots, however.

So you might have to get the screen coords of the handle, then project them to UMG coordinates on the Text widget and make sure the text widget is in a slot such as Canvas that will allow free positioning anywhere on the canvas.

Sorry I don’t know if this will work but it’s how I would begin trying.

Another approach would be to build your own Slider using a Button or draggable element and a rectangular Border behind that, within a Horizontal Box, which would allow you to incorporate the handle and the text into the same child widget. If you take this approach you will have to build all the logic for generating and reading slider values though, and making it draggable.

I’m trying to make a hud where a text stays above a slider handle and displays the value shown. Does anyone have a solution for this?

Yea basically what @mightyenigma said will work. Here is a video tutorial on how to do it, hope this helps!

oh nice! I’m glad my idea was a good one. Thanks for finding a tutorial