- Home /
Touch input broken with multi-touch
Hi,
I'm currently making a 2 players mobile game so it requires multi-touch
(https://www.youtube.com/watch?v=j98UocHlLmg)
Here is a description of the type of bug we can encounter :
The first player touch the screen, his finger is marked as input.touch(0)
The second player touch the screen while the first player's one is still on the screen, his finger is marked as input.touch(1)
But if the first player get his finger off, the second player's finger drop to input.touch(0)
And then if the first player touch the screen again while the second player's one is still on the screen, the second's player finger get back to Input.touch(1)...
Is there a way to keep track of a touch stably ?
Answer by nomadic · Jun 18, 2018 at 11:02 PM
Touch.fingerId (https://docs.unity3d.com/ScriptReference/Touch-fingerId.html)