All I need is to get the x coordinate of the touch position.
I want to know if the user has tapped on the right half of the screen.
This may not be the only touch on the screen… so here is what I have so far:
#pragma strict
function Update (){
for (var i = 0; i < Input.touchCount; ++i){
if (Input.GetTouch(i).phase == TouchPhase.Began) {
if (Input.GetTouch*.position > parseFloat(Screen.width/2)){*
//do something
-
}*
-
}*
}
}
Can someone help me?