TrailRenderer

Hello,

So I have a TrailRenderer for a tail of an object that is orbiting around a ring that isn’t moving for example3923569--334939--Static.png. Now the issue arises when the orbit ring itself is moving the trail (although doing its job correctly as far rendering the motion of the object) doesn’t look appealing 3923569--334942--Dynamic.png. Is there a way to have it so the motion vector can be switched to local space vs world space? This way the TrailRenderer can be aligned to the orbit ring vs how it is now, bleeding outside the trail.

Thanks!

If i may make a KSP analogy here, what you’re asking is how to trail the orbit of an object(be it a planet, moon, ship) and make the trail be the same as the orbit even though the entire system is moving through space and that induces a drift.

that is atleast what i got from the question.

I personally think that KSP uses the line renderer for this, and i think you should too.
I think the trail renderer is just a line renderer with special logic for tracking current position and adding position to the list removing them when the time is up, i think that will get in your way, but i could be way off on this one.

all you gotta do is plug your orbit(i recon it’s stored as a Vector3[ ]?. perfect. ;)), put a gradient there and rotate the order of the position to reflect the current position

1 Like

@SparrowsNest I had a feeling I would need to do this…alright CoolBeans thanks!

Particle system set to the local simulation mode can also prove to be useful, replacing the trail renderer.