Touch event

Hi folks,

i am working on a project, where character running on rope, 4 ropes are there

sometimes it coming 4th rope by pressing button,but sometimes,it is not coming

4th rope. i am a ttaching screen shot.

code:-

function Update ()

{

for(touch in iPhoneInput.touches) {
if(touch.phase == iPhoneTouchPhase.Began)// isAnimate == false)
{

//isAnimate = true;
//0.083

if(iPhoneInput. GetTouch(0).position.x < 512.0 iPhoneInput. GetTouch(0).position.y <384.0)
{
//isAnimateLJump = true;
//animation. Play(“LJump”);
animation.PlayQueued(“run”, QueueMode.CompleteOthers);
//animation.Stop(“LJump”);
tempPos = transform.position;
//tempPos.x = tempPos.x - 0.115;
tempPos.z = tempPos.z - 0.115686;
if(tempPos.z < -0.04496)
{
tempPos.z = tempPos.z + 0.115686;
//animation.Play(“LJump”);
print(“Move left”);
}
transform.position = tempPos;

}

else if(iPhoneInput. GetTouch(0).position.x > 512.0 iPhoneInput. GetTouch(0).position.y <384.0)
{
//isAnimateRJump = true;
//animation. Play(“RJump”);
animation.PlayQueued(“run”, QueueMode.CompleteOthers);
//animation.Stop(“RJump”);
tempPos = transform.position;
tempPos.z =tempPos.z + 0.115686;

if(tempPos.z > 0.302093 + 0.115686)
{
tempPos.z = tempPos.z - 0.115686;
print(“Move Right”);
}

transform.position = tempPos;
}

else if(iPhoneInput. GetTouch(0).position.y > 384.0)
{

//isAnimateUJump = true;
//animation. Play(“UJump”);
animation.PlayQueued(“run”, QueueMode.CompleteOthers);
//animation.Stop(“UJump”);
// tempPos = transform.position;
// tempPos.y =tempPos.y + 0.081F;
// transform.position = tempPos;
}

//break;
}
else
{
//isAnimate = false;
//animation. CrossFade(“run”);

}
}

}

test it on the device.

the editor remote testing is only to give you an idea, but it is not comparable to running on the device, cause the device does not have to push images and input at the same time through some wifi

also you are killing your iphone / network cause you didn’t set the game screen to iphone wide or iphone height but let it at none. keep in mind that the screen will be streamed to the iphone the very way its renderer there. it won’t be postprocessed to send

i had already checked in device,same problem diaplayed on screen.