The problem is that the touch is sometimes incorrectly read. Suppose there are 2 fingers on the touchscreen, and it shows 1. This situation occurs when you touch two fingers and the distance between them is minimal. When the distance between two fingers at least 1 cm - works like norms. Is it my problem or the code? PS I use unity remote

int fingerCount = 0; foreach (Touch touch in Input.touches) { fingerCount++; } if (fingerCount == 1) { Debug.Log("1"); _railMover.RotatingCam(); } if (fingerCount == 2) { touch = Input.GetTouch(0); touchX += touch.deltaPosition.x * xSpeed * 0.02f; touchY -= touch.deltaPosition.y * ySpeed * 0.02f; Debug.Log("2"); } 

    1 answer 1

    First of all, there is Input.touchCount , which the number of taches reports. Secondly, the device itself, like the program, has limitations (the so-called Threshold ), this is the minimum distance between two tachi , if the distance is less than this minimum, then the system considers that it is one touch . In many ways, it still depends on the type of screen (google, different types of screens and how they work).

    ps The fact that you have 1 cm between your fingers, of course, strange ... What kind of device do you have?

    • nexus 4) yes, I tried via Input.touchCount, but the result is the same. Therefore, the copy-code from the unit reference. - KoT Murchik
    • when the distance is less than 1 cm also works) but rarely) - KoT Murchik