- Home /
How would I implement a GUI texture that acts as a slider?
So I want to make a little slider in the corner of the screen (on an Android device, but that doesn't matter too much) which looks like a horizontal line. I want to be able to drag a little slider across it where, if you drag the slider to the right of the middle, the camera will rotate to the right, and if to the left, then the camera will rotate to the left. I have code on rotating the camera so I'm just wondering about the GUI texture itself; maybe have a seperate GUI texture as a little ball that slides across the slider (and reverts back to the center when it's not being dragged). Think of it like a control/analog stick that only goes left/right.
I'm just wondering how to make this work as a GUI element and how to include touch controls to make it work. I'm really getting confused with all the touch inputs and GUI button/texture functions and what to instantiate where and what not.
Prefer the answer in C# but not necessary.
Your answer
Follow this Question
Related Questions
GUI texture touch input problem 1 Answer
Look Stick for FPS Games on Mobile Platforms 1 Answer
Mouse and Oculus Touch Controller Inputs 0 Answers
How do I customize or reshape GUI vertical slider? 0 Answers
How do I get a GUI Texture Button to act as a Input Key such as a T button on a key bored or so? 1 Answer