void OnGUI()
{
foreach(Touch touch in Input.touches)
GUI.Label(new Rect(touch.position.x, touch.position.y, 100.0f, 100.0f), "Touch");
}
I’m having trouble with the touch input from the Iphone/Ipad. I’m using this simple code just to test the touch input ^^ and draw a label where ever you touch on the screen. For some reason the y position is inverted. Whenever you move upwards the label moves downwards, and visa versa.
I thought it had something to do with the position maybe being in screen space, so I tried converting it using GUIUtility.ScreenToGUIPoint, but still no joy.
Any help would be much appreciated, thanks!
Mike.