Drag an UI slider (no Unity GUI)

Since Unity GUI is only able to show a 2D Interface, I want to make my own 3D GUI within the game. Therefor I created a few Widgets, including a Slider.

5723-sliderrendersmall.png

I want the user to be able to drag the slider with the mouse. The camera is not fixed, the user is free to move within the game. But the slider will be a child of the camera. I have attached a picture that shows the idea with switches.

5725-interfacesmall_300px.png

Any help is appreciated :slight_smile:

Take a look at :

Use a raycast to get the hit point of the mouse on your object and move the slider thumb in that position according to the axis of the slider.