- Home /
Strange touch behavior
Hi. When I put 2 fingers on the screen (finger 1 first, and then finger 2). When I then take finger finger 1 of the screen - finger 2 becomes finger 1?
touch1 = Input.GetTouch(0);
touch2 = Input.GetTouch(1);
How can this be fixed?
It shouldn't matter if your routine can handle it, but it sounds like the touch phases are not being handled correctly. You need to 'lock' the finger for its current procedure and use the 'Ended' and 'Canceled' phases to release the fingerlock.
It's right that it doesn't "release". When I take finger 1 of, it should run the touch 1 canceled or ended function. But neither .Ended or .Canceled works.
Depending on what you are trying to do you may not need Input.GetTouch
you can also use
if (Input.GetButtonDown ("Fire1")) { //do stuff }
This works pretty well except it can detect more than one input at the same time if you are using
Input.GetButton
Your answer
Follow this Question
Related Questions
how can i create a finger trail 1 Answer
Camera momentum after lifting finger 0 Answers
Do On swipe finger? 1 Answer