iOS input question...

Is there anyway to detect iOS touches in only a certain portion of the screen? I know the obvious solution is to use a button instead of detecting a touch, but what if I want to do somehting like this:

function Update(){
    if(Input.touchCount == 1){
    	transform.position.y += Input.touches[0].deltaPosition.y*.05;
    }
}

But only if the player’s input is on the right side of the screen (so that any motion of the left side will be ignored)? Thanks

You can use the screens pixel coordinates in a conditional. The bottom left corner of the screen is (0,0) so you would simply take any pixel above half of the Screen.width for the right side, any pixel below that for the left.

function Update(){
    if(Input.touchCount == 1){
        if(Input.touches[0].position > Screen.width/2){
            transform.position.y += Input.touches[0].deltaPosition.y*.05;
        }
    }
}