After I read the documentation Unity - Scripting API: Input.GetTouch it still isn’t clear to me if the touch index changes. For example, if the current index is two but the first touch ends will the index to change to one?
PS: As it is related to this question, is Input.GetTouch() a copy or the actual reference?
The index can change if the number of touches changes.
The “Touch” struct that you get from GetTouch , has a property called fingerId.
That finger id will stay the same as long as the touch exist, even if the touch index changes.
So if I understand you correctly I can use the same reference of a Touch struct until the touch ends?
Should I get the touch through checking all the touches until the fingerid matches?