I’m trying to make the orbital paths visible for my solar system simulation game. I have most around with trail renderers and solid line sprite but not achieving the desired look I want. I’m hoping to get something where the path is alway present but darker directly behind where the planet currently is, and lighter and more transparent ahead of where it’s going. This effect is achieved in the game Worbital. worbital example here

If anyone could point me in the right direction how I can achieve this I would be much appreciated.

  • \$\begingroup\$ When you say you are not achieving the desired look you want, do you mean you don’t like the way the line itself looks, (maybe whatever you tried before had visible aliasing for example,) or are you asking how to achieve the “lighter-ahead, darker behind” effect given a method of drawing lines? \$\endgroup\$
    – Ryan1729
    Sep 15 '20 at 5:47
  • \$\begingroup\$ yeh i was trying to draw it with the built in trail renderer, which does look good but starts drawing when you play, so it wouldnt make my desired effect until the plants made a full revolution. What im looking for is a way to make it from the beginning of the planet cycles \$\endgroup\$
    – Jeremy
    Sep 15 '20 at 20:06

It really depends on your use case.

But if your orbits are not 1000000 light years long you can use a semi-transparent mesh (torus from Blender, or ProBuilder, just find the setting for the thickness ) for your lighter colored path, and a particle system or VFX for your darker stuff, that trails the ship.
You might have to smoothen out some edges if it looks too blocky. Might not be super optimized but can be set up realatively quickly.

Or you can divide up your path torus and call something on OnTriggerEnter() and do some color changes to that part of the mesh...

Hope it helps!


You know how fast the objects are moving. Then you also can figure out how long time ago a object was at a specific position, also the oter way around, you can calulate how long time it will take for object to get to a point.

Use that info the shade the lines in the way you want

  • 1
    \$\begingroup\$ Can you go into more detail? Maybe post a C# code snippet which shows how to do this? \$\endgroup\$
    – Philipp
    Sep 15 '20 at 16:34
  • \$\begingroup\$ No. I did try to give you an idea of how you can solve it. I have no idea how your code looks like. \$\endgroup\$ Sep 15 '20 at 17:41
  • \$\begingroup\$ would you suggest doing this in a shader of some sort or just using the unity line renderer? \$\endgroup\$
    – Jeremy
    Sep 15 '20 at 20:09
  • \$\begingroup\$ I dont know, I don't know Unity that well. I don't use unity usually. \$\endgroup\$ Sep 15 '20 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.