How do I create snaps on UMG slider?

Hey all, I have a slider in UMG, and i would like to set it to snaps, for example, divided into 10? Cant seem to find out how.

Here’s a variant of snapping. Instead of snapping to values you can choose number of snaps…

STEP 1: Add this function in your Widgets blueprint…

STEP 2: Then Setup the events to trigger the snapping. Don’t forget to connect your slider and set number of steps…

Note! Since the function is not hard connected a slider the same slider can be used any number of sliders within the widget. In other words no need for rewrites for each slider. :slight_smile:

Simplified Snap to value method :

No, simple way is my way
I need change speed from 0 to 3, and snap size by 1, and get => 0,1,2,3

  1. Create variable and name it Speed
  2. Bind this vatiable on Slider
  3. on value changed slider set speed by round value and set speed

303267-nvidia-share-67ahvqclqc.png

Nice and clean!