Moving object towards a position instead of jumping to position

Hi there!

Im starting to learn some physics in Unity, and im starting with a 2D Game.
I’ve created a rocket that is supposed to be controlled by touch input. So far i’ve got this code:

    private void HandleSteering()
    {
        if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {
            Vector3 rawPosition = gameCamera.ScreenToWorldPoint(Input.mousePosition);
            Vector3 targetPosition = new Vector3(rawPosition.x, -2.128f, 0.0f);
            float targetWidth = Mathf.Clamp(targetPosition.x, -maxWidth, maxWidth);
            targetPosition = new Vector3(targetWidth, targetPosition.y, targetPosition.z);       
            rigidbody2D.MovePosition(targetPosition);
        }
    }

What this does is checking the input of the mouseposition(this also works with touch input). it creates a targetposition. After that i clamps the targetwidth so the rocket wont exit the screen. And this works almost as i want it to.
However, if the rocket is to the left of the screen, and i touch and move with my finger on the right side of the screen, my object will jump to this position, instead of moving to the place which the input was dragged.

What i’m looking for is if i put a finger on the right side of the screen, i want to move my object as much as the input was moved, and not making it jump to that position.

I’ve tried the Vector3.MoveTowards and this works, but the movement is very sluggish.
I’ve also tried using Input.GetTouch(0).deltaPosition, but i couldn’t figure out how to use it because as fast as i touched the screen to steer the rocket would get positioned to the side of the screen.

Solved the jump in the movement.
The whole time i was using the touch input position and moved my gameobject to that position. therefor long movements seemed like a jump.

The correct way was to use the deltaposition and append that to my gameobjects position instead. Just as i said that i tried in the original post, but this time i multiplied the deltaposition by 0.04f so that the gameobject didn’t move to fast from side to side. The code looks like this if anyone else gets stuck:

    private void HandleSteering()
    {
        if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {
            Vector3 movement = Input.GetTouch(0).deltaPosition;
            Vector3 targetPosition = new Vector3(rigidbody2D.transform.position.x + (movement.x * this.moveSpeed), -2.128f, 0.0f);
            float targetWidth = Mathf.Clamp(targetPosition.x, -maxWidth, maxWidth);
            targetPosition = new Vector3(targetWidth, targetPosition.y, targetPosition.z);
            rigidbody2D.MovePosition(targetPosition);
        }
    }