Hello everyone,
I'm new to NGUI (and to UI in general), and I was hoping that someone could point me in the right direction when it comes to programming virtual analog sticks for touch devices.
With NGUI, the task of making a button draggable and having that button return seems easy enough (the components for that type of behavior are built in), but I was wondering how translating that movement into input for scripts was handled (say for moving a player around with that virtual analog stick). Off the top of my head, I suppose you could compare that current position of the analog stick to its starting position, and then take the difference and turn it into input a script could use (so if the stick is normally at say 0 0 0, if it was moved to 0 10(y) 0, the difference on Y would be positive and a script condition would be met and the player would start moving forward....or something like that).
So I was just wondering what the preferred method of getting input like this is when working with virtual analog sticks, any advice is appreciated.