Mar’ri mar’ri, I hope you are fine today.
I am having a problem using multitouch and fast gestures, or rather, discrete touches mistaken as fast moves.
¿ Should I find or make my own touch detection ?¿ Is this a known issue with a simple solution ?
Precise : When making two consecutive taps, very “close in time”, Unity tells me it’s the same fingerID moving super fast, while the android system notices the difference between touches.
(To test this I activated the “show touches” option of the Android system and made a simple Unity app to draw it’s opinion, and it draw a line between the taps, because it thinks it’s the same fingerId, but the Android debug does not draw such connection)
Uhm, are you sure you don’t get a TouchPhase.Ended / Canceled and for the second touch a TouchPhase.Began? If the first touch has ended then of course the second touch would get the same fingerID. The FingerID is only valid between “Began” and “Ended / Canceled”. The moment you lift the finger from the surface there’s no way to keep tracking the finger. At that point the fingerID has lost it’s meaning. If a new touch occures (TouchPhase.Began) that finger will get a currently free fingerID. In most cases it’s picks the lowest free ID.
finger event ID
F1 down 0
F2 down 1
F3 down 2
F3 up - // id 2 is now free
F1 up - // id 0 is now free
F3 down 0
F1 down 2
As you can see once we lift finger 1 and 3 those ids are free again. Because finger 3 touched again it gets lowest free id which is 0. If the finger isn’t touching the surface it doesn’t exist from the point of view of the touch hardware. When finger 3 touches again it’s just a “new finger”.
Can you post the example code you used to test this? Do you actually check the touch phase?
Keep in mind that with 3 fingers on the screen it’s possible that the hardware looses track of one because depending on the positions it’s possible that two fingers are “shadowing” the third. It’s a similar problem like key ghosting in keyboards. As long as the fingers don’t share the same column and row at the same time it shouldn’t happen.
problem no problem
“1” might be invisible to the hardware. I’ve also seen hardware that has already problems with only two fingers when they are on the same row.