android touch input

hey all,

how can i make it so that a touch area is constrained
eg.
if you touch the bottom right it will look around, if you touch the bottom left it will move the player, top right will execute a shoot command and top left will aim down sight.

how can i do this? please no linking to the android.input page it does not explain anything about how to do this

var cornerSize : int;

function Update()
{
    for(var i:int=0;i<Input.touchCount;i++)
    {
       if(Input.GetTouch(i).phase==TouchPhase.Began)
       {
            TouchInCornerEval(Input.GetTouch(i).position);
       }
    }
}

function TouchInCornerEval(pos : Vector2)
{
    if(pos.x<cornerSize&&pos.y<cornerSize)
    {
       print("touch in bottom left corner);
    }
    else if(pos.x<cornerSize&&pos.y>Screen.height-cornerSize)
    {
       print("touch in upper left corner);
    }
    else
    {
         print("you get the idea!The other two are for you to do....);
    }

}

Thank you gregzo. It helped me too. :slight_smile: