Multi touch not working, what am i doing wrong?

Hiii i use joystick buttons to move using Camera Relative Controls on my android mobile

Issue coming is - i have made a guiTexture and my weapon fires on clicking it…but i have noticed when i am moving using my joystick…it does not work…why so ??

here is my code

Just incase - I am using Dell Streak android 2.2

I’m just going to throw this solution out there, don’t use Input.mousePosition when programming for multi touch. It won’t work. You have to use Input.GetTouch(i).position if you want the position of a particular finger.

What you need to do is keep track of the players finger ID’s and then track their position, then reset their ID’s when they stop touching the device.

for(int i = 0; i < Input.touchCount; i++)
			{
				Touch touch = Input.GetTouch(i);
				if(touch.phase == TouchPhase.Began  touchRectangle.Value.Contains(touch.position))
				{
					fingerID = touch.fingerId;
					originalPosition = touch.position;
					
				}
				if(touch.fingerId == fingerID  (touch.phase == TouchPhase.Moved || touch.phase == TouchPhase.Stationary))
				{
					Vector2 newPosition = touch.position;
					outputVector.x = newPosition.x - originalPosition.x;
					outputVector.y = newPosition.y - originalPosition.y;
				}
				if(touch.fingerId == fingerID  (touch.phase == TouchPhase.Canceled || touch.phase == TouchPhase.Ended))
				{
					fingerID = 1111;
				}
				//Debug.Log("Is touching: " + outputVector);
				
			}

This is actual workable code from my own projects. As you can see I track the moment the user touches the screen all the way to the moment they release. So that I can know where that finger is at all times.

thaanks for a prompt reply, quickly

is something worng in this line ?
Touch touch = Input.GetTouch(i);
and
TouchPhase.Canceled

and i have to wrap it in Update function ?

i have tried this coe for gui touch with camera relative controls but no multi touch working till now -

TouchPhase.Canceled will not be called very often (if you have more than five fingers on the screen or so). I do not use the TouchPhase at all, but TouchPhase.Began, TouchPhase.Moved, TouchPhase.Stationary and TouchPhase.Ended work definitely (but not as reliable as I wished).

hi jessica have you got solution for this one???