Multitouch on Android: position incorrect
Good morning,
when trying to use multitouch with Unity on my Android device, the reported position for the 2nd touch is way off.
Basically, the x-coordinate will barely change at all when moving the finger across the screen, while the y-coordinate will take on values between 15.000 and 60.000. Also, both coordinates seem to change independently from the axis in which the actual movement occurs.
My code:
string deb="";
for (int i = 0; i < Input.touchCount; i++) {
deb += i + ": " + Input.GetTouch (i).phase + " - " + Input.GetTouch (i).position+"\n";
}
debugText.text = deb;
(outputting to screen as I am having trouble with logcat) will result in the following values when placing the 1st touch at a random position and the 2nd touch near the origin (should be close to 0|0):
0: Stationary - (882.8, 869.2)
1: Stationary - (1020.3, 15602.6)
As you can see, the first touch seems to be allright while the second touch gives me ridiculous values.
I am using:
Unity Version 5.3.1f1 - free
Android: 5.1.1
Any ideas how to fix this problem? Did anybody else have the same issue? Might it be just a plain bug which I should best report to Unity?
Thanks for any help and suggestion.
Your answer
Follow this Question
Related Questions
Player i spining when moving 0 Answers
Why is my multi touch not working? 1 Answer
Mady by Unity Logo Not Showing Anymore Unity 5.5 Android 0 Answers
Two finger tap causes jump bug 0 Answers