Because people are constantly going "How do we make analog sticks", I made a quickie example which I will be updating whenever to ensure even the beginners know how to use it.
Analog Stick Example V1.1 (GMS, multi touch compatible)
It's currently in GM8.0 but fortunately you can import this into GMS so cookies all round! Though I'd like to know how it works on Android/iOS please?
How it works. It used the direction and distance from the center of the circle pad to the mouse co-ordinate to calculate the direction in which the movement would face. I haven't shown it yet but that's because it's a work in progress. But everything's there that you can it yourself...
But this is a W.I.P. I will be working on this later tonight to implement a block that moves around the screen to show what I mean
Until tonight/later/whenever I update it next, I hope this will provide an insight into Analog Stick.
Things left to implement
- Two+ Analog Sticks (Still yet to work with GMS on Android/iOS (So this won't be for a while)
- Block that moves to show movement by the Analog Stick
- Better explanation (I hope to work better explanation. My explaining skills aren't the best)
Happy programming folks and see people? It's not rocket science. Now excuse whilst I go find a rocket to fly...
EDIT: I know this should be in the Examples section, but I see this more appropiate here as there isn't a section for Touchscreen Examples
Edited by King Tetiro, 18 April 2013 - 06:15 PM.