Version: 2020.2
言語: 日本語
public int fingerId ;

説明

タッチのユニークなインデックス

現在のすべてのタッチは Input.touches の配列か、 Input.GetTouch 関数で配列のインデックスに相当するものを渡すことで情報を取得します。しかし配列のインデックスはフレーム間で必ずしも同じであることは保証されていません。fingerId はフレーム間でも同じ指であれば値は変わりません。この ID は指の動きの分析に使用したり、また、前フレームの位置の差分から指を特定するよりも信頼性が高いです。

Touch.fingerId is not the same as "first" touch, "second" touch and so on. It is merely a unique id per gesture. You cannot make any assumptions about fingerId and the number of fingers actually on screen, since virtual touches will be introduced to handle the fact that the touch structure is constant for an entire frame (while in reality the number of touches obviously might not be true, e.g. if multiple tappings occur within a single frame).