hi,
I have a GameObject wich move when we moved one finger on the screen with this script:
if(Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {
touchDeltaPosition = Input.GetTouch(0).deltaPosition;
transform.Translate(touchDeltaPosition.x*speed,
touchDeltaPosition.y*speed, 0);
}
Now i would want if I remove my finger to the screen and i moved my finger fast, the GameObject continue this run with deceleration to a stop but not if i move it slowly.
Any ideas how to do this?