|
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.
(comments are locked)
|
|
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. Thanks for the quick reply. I'm hesitant to use TouchPhase.states because of this post on the Unity forums. http://forum.unity3d.com/threads/93987-Unity-remote-and-touch-phase-ended Have you had any problems with this yourself?
Nov 10 '11 at 08:30 AM
BlacKatFever
(comments are locked)
|
