can anyone help me with this:
for(touch in iPhoneInput.touches)
{
if(touch.phase == iPhoneTouchPhase.Began)
{ //ignore touches that don't match 1st
if (!fingerDown)
{
fingerID = touch.fingerId;
fingerDown = true;
swipeStart = touch.position;
swipeEnd = swipeStart;
}
}
if(touch.phase == iPhoneTouchPhase.Moved touch.fingerId == fingerID) swipeEnd = touch.position;
if(touch.phase == iPhoneTouchPhase.Ended touch.fingerId == fingerID)
{
fingerDown = false;
numOfTaps = touch.tapCount;
}
}
occasionally fingerDown gets stuck at true when finger is no longer touching the screen and causes big problems. I’m calling every frame. Would FixedUpdate be better?