- Home /
Touch queue problem
After "For" while when I loop for every touch in Input, I want to check this three statement below. The third statement is when I want to stop touching the screen but third statement not always execute. I try to solve this problem for a long time and I thing it's something wrong with the queue and phase.Ended. If anyone know what can be wrong with it?? please help.
if(holding_ball == false && Input.GetTouch (i).phase == TouchPhase.Began)
{
fingerland_dotyku = Input.GetTouch (i).fingerID;
}
else if(holding_ball == true && fingerland_dotyku == Input.GetTouch (i).fingerId && Input.GetTouch (i).phase != TouchPhase.Ended)
{
}
else if(holding_ball == true && fingerland_dotyku == Input.GetTouch (i).fingerId && (Input.GetTouch (i).phase == TouchPhase.Ended || Input.GetTouch (i).phase == TouchPhase.Canceled || Input.GetTouch (i).phase == TouchPhase.Stationary))
{
}
Comment
Your TouchPhase logic is a little screwy. Using the != ended messes with your || of detecting 3 phases.
Your answer
Follow this Question
Related Questions
multi-touch woe, index out of bounds? 1 Answer
Mouse and Oculus Touch Controller Inputs 0 Answers
Input.GetTouch SOMETIMES not registering on iOS 0 Answers
Simultaneous touch inputs do not always work 0 Answers
Apple touch device input touch question 0 Answers