In my 2D unity game as the ball moves a trail renderer follows it. However, there is a teleportation point in the game so when the ball teleported trail renderer draws a long line through the way ball teleported. I don't want it to show up while teleporting. How can I do that ?
Here is what happens when the ball teleported
Here is simple code for teleport
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.CompareTag("portal"))
{
transform.position = portal2.transform.position;
}