Slider bar on geometry?

I was just wondering is there is some easy way to get this without scripting it by myself.
I need to move a few fader buttons on a 3d object, something like this:

so the buttons need to be abel to move in only in 1 axis, with upper and lower limits and also features like snapping to some positions or just going back to last position if the next position is not reached… like when you release the button in the middle and you don’t reach the upper limit, so it slides back by itself.

I guess its probably not too hard to script that, but if something is out there already that I can use or modify would be much easer… in case somebody knows anything like that.

Thanks!

You can use raycast to detect if you are hitting button. If so, u can move button with Input.mousePosition value; To make the limits you can just get your button’s move axis, and clamp it using mathf.Clamp.

I did script it myself yesterday… wasn’t as hard as I thought its gonna be.
But why would you use raycast instead of OnMouseDown or Drag?

I am very new to unity, but OnMouseDrag looks a lot easier to use then raycasts.