Just curious, but how do you distinguish between a tap and a hold on the iPhone. Just looking at the different keywords we have, I thought it might have something to do with TouchPhase.Began and TouchPhase.Stationary, but nothing I've tried works.
I'm trying to set up a timer through the update function that says GetMouseButton, timer += Time.deltaTime and then once the timer exceeds a certain value (0.7s) then it will be considered a hold but I can't find a similar function for GetMouseButton via the Touch controls.
Whatever method I use, it will need to coexist with flick and double tap controls as well. :P
Any suggestions or links to good iphone control resources?
This is the code that I'm juggling at the moment.
I handle all touch stuff in an Update. Keep track of when a touch starts, and if it's held past a certain amount of time, it's a 'long click'. Similar for double-tap, looking for touch begin/end and time between last end and next begin.
answered Nov 10 '11 at 08:18 AM