My drag camera script gets messed up when changing fingers. Please help! (android)

the following code translates a camera upp and down when draging up and down over the screen. It works but there is one problem, lets say I put one finger down for draging, then I put a second finger down for some other reasson. I now got to fingers touching the screen, the problem is if I release the first finger; the camera jumps quite a bit.

I think the problem lies with the GetMouseButtonDown event, but im not sure how to solve it :confused:

function Update ()
{
    if (Input.GetMouseButtonDown(0) && Input.touchCount == 1)
    {
        firstTransformPos = (Input.mousePosition.y/Screen.height);
        old = 0;
    }

    if(Input.GetMouseButton(0) && Input.touchCount == 1)// This keeps running while mouse is held down
    {
        curMousePos =  (Input.mousePosition.y/Screen.height) - firstTransformPos;
        transform.Translate(0, -(curMousePos-old)*10, 0);
        old = curMousePos;
    }
}

Does anyone have a solution or perhaps a script which does the same thing basically?

also posted here: http://forum.unity3d.com/threads/132214-My-drag-camera-script-gets-messed-up-when-changing-fingers.-Please-help!?p=892697#post892697

If you need multitouch, then you need to code specificaly for it, using Input.GetTouch. Might need to raycast with each finger, depending on your use case.

Basic structure:

function Update()
{
    for(var i:int=0;i<Input.touchCount;i++)
    {
        Debug.Log("this finger's id is "+Input.GetTouch(i).fingerId);
        Debug.Log("this finger's position is "+Input.GetTouch(i).position);
        Debug.Log("this finger's TouchPhase is "+Input.GetTouch(i).phase);
    }

}