- Home /
Is there a way to make TouchPhase.Moved less sensitive?
I am currently making a game for Android devices. My character is supposed to "dash" when the player swipes across the screen. My problem right now is, that this happens even with just the slightest movement of a finger. On top of that, it seems like every Android device has it's own touch-sensitivity, which further adds to the problem. If I could however, tamper with the distance a finger has to travel across the screen to get recognized as a swipe, i wouldn't have this problem. Has anyone any idea how to achieve that or maybe even another solution for my problem?
Answer by robertbu · May 12, 2014 at 03:26 PM
How about using the the Touch.deltaPosition to check the amount of the movement during a Moved event before staring a dash? Since screen density varies between devices, you probably want to normalize that reading. Depending on your use, you can use Screen.dpi or the vertical height of the screen. Note I think Screen.dpi is only set on mobile devices, not on a desktop or web build.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Flip over an object (smooth transition) 3 Answers