- Home /
Different swipe speeds on different resolutions
I am using touch.deltaposition and when i swipe on different devices with higher or lower res it swipes either faster or slower and not sure how to fix it.
Comment
Best Answer
Answer by breban1 · May 14 at 12:48 PM
I usually end up doing this by using percentages of the screen instead of using the raw values.
Something like:
float delta_x_perc = touch.deltaPosition.x / Screen.width;
float delta_y_perc = touch.deltaPosition.y / Screen.height;
Hope that helps!
Absolute legend. I tried doing that but I never put in a variable. Thank you so much I have been stressing for weeks!!
Your answer
Follow this Question
Related Questions
Swipe and Hit Object in Direction 1 Answer
Is there a way to optimize Input.GetAxis on windows phone? 1 Answer
Unity2D iOS Dragable items by touch 0 Answers
Unity 2D. How to swipe without detecting tap? 2 Answers
Help to fix my drag code [SOLVED] 1 Answer