Moving game object acording to the touch move speed?

How to move an gameObject according to the touch move speed, all Im on interested on is x,y since i’m developing 2d Game. Any help or code example???

Thanks.

Get the initial touch position, then calculate the delta in touchphase.moved and apply the results to the transform, adjusting the final results to get the speed you want for the object.

Can you post some code sample just to get me started :slight_smile: ? sorry because im bit new in IOS development

current code :

if(touch_n1.phase == TouchPhase.Moved){

transform.Translate(touch_n1.deltaPosition * Time.deltaTime * movingRate,Space.World);

}

regards