Trail Renderer changes end shape when emission is disabled

When disabling emission on the Trail Renderer the end shape goes from having 2 points to 3 points. This distorts the texture and creates an unwanted effect. Is there any way to prevent it from doing that or is it a bug?

8844196--1205374--Trail1.png ------> 8844196--1205377--Trail2.png

It’s just how it is implemented - disabling emission sets the width to 0, so the last emitted point tapers to 0 at the first “invisible” point.

At the time where you set emitting to disabled, perhaps adding a new point via the script api (TrailRenderer.AddPosition) at the same place would work around it. I’m not sure if it would work tho. Otherwise I’m not sure I have any other ideas.

1 Like

Thanks for the quick reply! However, I couldn’t get the solution to work in my setup so ended up with making an alternative by having multiple cached trails and then picking one that is not currently used. This way I don’t have to stop the emission as they can all run until completion.

1 Like

This…is a very weird way to implement it. Come on. It screws up uv’s of the geometry badly. Is there really no way around it?
I don’t want to set the width to 0…I want to stop the emission…

How can this pass any sort of quality control?
2021.3

9218811--1286517--trail.png

This is pretty janky (2022.3).

A painful workaround exists where you can unattach the trail renderer from the moving object, keep it emitting and carefully tween the trail color value to an alpha of 0 so it disappears when the tail catches up to the head.

Encountered the same issue now when creating car skidmarks. I know there might be different ways to implement skidmarks, but TrailRenderer seemed like a suitable choice and works perfectly otherwise.

Starting and stopping the emission also ignores End Vertices, which is pretty confusing.

Is merging into a single point a limitation? Or a decision? There should definitely be a setting in the inspector for this - I’d even rather the last vertex be discarded than seeing the broken UV tapers.