Trail Renderer and Render Order

I have attached a trail renderer to a game object that orbits around another object. Doing what trails do best, this trail renderer leaves a trail out a couple seconds behind the moving game object.

The problem is that the render order of the entire trail renderer seems to depend on the render order of the game object. That is, if the game object is in front of something, it renders on top. Likewise, the entire trail renders in front as well, even if the trail is actually behind something else.

Hopefully this makes sense… Does anyone have any ideas on how to get the trail renderer to render correctly? Or is the trail renderer an all-or-nothing render?

Interesting, I just did a test shooting a Trail Render through a sphere, and you’re right. As soon as the Game Object with the TR passes through the sphere the whole thing gets sorted behind the sphere. Never noticed that before.

What shader are you using with the trail renderer?
Use a particle shader and it should work.

It does it with the particle shader.

Ok i am not quite sure what exactly you are talking about. Do you have a sample project or player. Just send it via Report Bug.app.

lol, this wasn’t even my question to begin with, but what the hell. I just made an orbit scene similar to what tsphillips was talking about and presto, the darn thing works perfectly, with diffuse, particle, whatever shader except for FX/Flare and of course GUI Text. Sorry for the confusion Joe :sweat_smile:

tsphillips, are you using any funky shaders?

Bug report is on the way.