Touches and Rotations. Problem

Hello, i’m doing an Android pinball game and i have this code.
pe1 and p2 are the cubes used to hit the ball.
I think that the rotation is works good but I cant see any move i think because of the Touch use. Can anyone help me?

var toke : Touch;
var toke2 : Touch;

var pe1 : GameObject;
var pe2 : GameObject;

function Update () {

pe2.rigidbody.centerOfMass = Vector3 (0, 0, 2);
pe1.rigidbody.centerOfMass = Vector3 (0, 0, -2);
toke = Input.GetTouch(0);
toke2 = Input.GetTouch(1);

if ((toke.position.y > 200)(toke.phase == TouchPhase.Began))
{
if(pe1.transform.localEulerAngles.y < 45)
pe1.rigidbody.AddRelativeTorque(0,700,0);
else if (toke.phase == TouchPhase.Ended)
pe1.rigidbody.AddRelativeTorque(0,-700,0);
}

else if ((toke.position.y<=200)(toke.phase == TouchPhase.Began))
{
if(pe2.transform.localEulerAngles.y < 45)
pe2.rigidbody.AddRelativeTorque(0,700,0);
else if (toke.phase == TouchPhase.Ended)
pe2.rigidbody.AddRelativeTorque(0,-700,0);
}



if ((toke2.position.y > 200)(toke2.phase == TouchPhase.Began))
{
if(pe1.transform.localEulerAngles.y < 45)
pe1.rigidbody.AddRelativeTorque(0,700,0);
else if (toke.phase == TouchPhase.Ended)
pe1.rigidbody.AddRelativeTorque(0,-700,0);
}

else if ((toke2.position.y<=200)(toke2.phase == TouchPhase.Began))
{
if(pe2.transform.localEulerAngles.y < 45)
pe2.rigidbody.AddRelativeTorque(0,700,0);
else if (toke.phase == TouchPhase.Ended)
pe2.rigidbody.AddRelativeTorque(0,-700,0);
}

}

bump!

when I touch with one finger the screen, nothing happens, but if I touch with 2 fingers, the script works. Why?

Thats cause your code is wrong, it does not handle a 1 touch situation at all.

But a word of warning: On 2010 top sellers like the HTC Desire, there are major problems with multitouch, keep that in mind when it comes to “which device to not support and the related lose of userbase”