0
\$\begingroup\$

I'm working on a simple space combat game (single-player) with the goal of having 100+ fighters and capital ships in a single battle. To keep system requirements down I'm using a minimum of effects. One that I do wish to include, however, is that of 'ion trails' from the rocket engines of the spacecraft and missiles. Ideally it would look something like the images below. The trail won't have to be very long, but I do want it to curve to show the spaceship's path, acting as a visual aid in a dogfight.

example of a single spaceship emitting an 'ion trail'example of multiple spaceships emitting an 'ion trail'

My question is, how to implementing such trails efficiently?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

Use trail renderer component with the object.

You can set time, width, color etc with it.

See for more.

\$\endgroup\$
7
  • \$\begingroup\$ This is technically correct in that you should probably use the TrailRenderer componenet. The question seems to ask "how do I do this efficiently", which this answer does not attempt to answer very well, at all. \$\endgroup\$
    – Gnemlock
    Commented Aug 14, 2016 at 5:02
  • 2
    \$\begingroup\$ @Timelord64 What do you mean exactly? Trail Renderer is the most efficient method of implementing what OP asks. If you know a better method, share it with us. \$\endgroup\$ Commented Aug 14, 2016 at 11:40
  • \$\begingroup\$ @S.TarıkÇetin, what I mean is, the asker asks how to set something up for trails. This answer merely points to the manual page for the component. It would be like if someone asked "what was the most efficient way to manage collision" and I posted an answer that said "with a collision box. Here is the manual page on it.". Sure, the answer might seem obvious. But no effort has really been made to submit an answer, given that the question is how to not what to. \$\endgroup\$
    – Gnemlock
    Commented Aug 14, 2016 at 11:45
  • 2
    \$\begingroup\$ @Timelord64 I still don't understand your point. This answer clearly states how to create trails in Unity: By using TrailRenderer. You don't need to set up anything special to make TrailRenderer work. and documentation page already explains everything you need to know about how to use it. It's OP's mistake to not make a research before posting a question, since their question has a direct answer on the Unity Manual. \$\endgroup\$ Commented Aug 14, 2016 at 11:50
  • 2
    \$\begingroup\$ I think the answer is sufficient. I'd have instinctively used a particle system, so I am pleased to learn there is a way of doing this specific kind of thing. \$\endgroup\$ Commented Aug 14, 2016 at 19:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .