Teleport + TrailRenderer = problem

Hi guys,

I have this problem when using trail renderer on “spaceship” (like asteroids - atari).

Well… Because change the ship’s position dramatically the trail follows and appears across the screen.

How do I solve this? I turn on and off? Use another method better?

Thank you for your attention.



GetComponent<TrailRenderer>().time = 0;

for a split of a second solves the issue. Use Invoke to turn it back on.
Whole solution can be found here.