Drag an object to touch position(Problem)

I am using the below code to move the object to touch postion. I am developing for ios. Below is the code

using UnityEngine;
using System.Collections;

public class dragtheobjectontouch : MonoBehaviour {

	public GUIText debugtext;
	public GameObject dragobject;
	public Vector2 realworldposition;
	
	void Awake()
	{
	Application.targetFrameRate=60;
	}
	
	void Update () {
	if(Input.touchCount>0)
		{
		foreach(Touch touch in Input.touches)
			{
			if(touch.phase==TouchPhase.Moved)
				{
				debugtext.text=touch.position.ToString();
				realworldposition=Camera.main.ScreenToWorldPoint(touch.position);
				dragobject.transform.position=new Vector3(realworldposition.x,realworldposition.y,dragobject.transform.position.z);
				}
			}
		}
	}
}

The Above code works perfectly but the problem is when i start moving the finger on ipad very fast the object lags behind the finger as if it is following it. Ofcourse it comes to the perfect position of touch when i stop moving the finger on the screen, but it really lags when the finger moves very quickly on the screen.

I found the question interesting, so I poked around a bit. If you Google some combination of “iOS/iPhone/iPad Touch/Input Lag/Lagging” you will find a bunch of hits not just for Unity but for iOS apps in general. This seems to be a general problem with touch devices (iOS and Android). The lag seems to be a hardware issue with the device and not something that can be solved by the apps.

The fact that your object eventually catches up to your finger is a strong indication this is a hardware issue. I did read in one place where a developer felt he had mitigated the issue somewhat by increasing the frame rate. There are downsides to increasing the FPS, but if you want, apparently it can be set like this:

 Application.targetFrameRate = 60;

I don’t have time to run the test at the moment, so if you test it, please post your results back to the list.

Here is one page that talks about hardware lag:

Lag: The Bane Of Touch Screens