Trail Renderer leaving streaks from last position

I’m trying to make a swipe trail on a touch position and I’m having issues.

Currently when I press mousebuttondown the trail starts, and when mousebuttonup it disappears. (which is exactly what I want).

But if I start a new trail on mousebuttondown in a new position, the trail starts from the last mousebuttonup position and glitchily streaks across to the pos of the new mousebuttondown.

I’ve completely stripped my code of all excess (before I was trying to attach a hit collider) and I’m still having the same problem.

Can’t find anyone else having the issue and I’m at wits end with this.

Here’s a video demonstrating.

And the code I’m using:

public class Swipe2 : MonoBehaviour
{
void Start()
{
Cursor.visible = false;
}

void Update()
{
    Vector2 pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
    transform.position = pos;
}

}

You can use TrailRenderer.Clear() to erase the history of the trail renderer before you move it to a new distant position.