touchcount variating on different devices

When I use the code with my Androd phone, it works just as I want. If I try my game on my dads phone, my player rotates alot faster.

My code:

if(Input.touchCount > 0){
    Vector3 position = Input.touches[0].position;
    float rotation = (position.x < (Screen.width / 2)) ? 10f : -10f;
    transform.Rotate(0,0,rotation);
 }

(This code makes my player rotate to the left if i press the left side of the screen, and rotate right if I press on the right side of the screen.)

How can I make the rotate speed the same on all devices? Appreciate answers.

Made it work: This problem was caused by different frames per second. I just limited the fps like this: Application.targetFrameRate = 60; And it works just fine.

The second device, when running your game, has a faster frame rate than the first.

Search for things like “unity game runs too fast.” That will explain the problems with moving a certain amount per-frame, and how to use Time.deltaTime to account for different frame rates.

Do both of the devices have the exact same screen width? If not, it is expected. See if this was what you were missing for. Cheers.