Need help with a trail effect!

Hey there!

I am not sure how to achieve this effect seen below:

In my game, I have a ball which is moved around using physics. I’d like to have some sort of effect (I am guessing particle system) which follows behind my ball like seen in the picture above (or if you want a another type of reference, look at the particle effect which follows Tracer or Lucio from Overwatch).

Just a simple little white effect like that in the picture.
Any pointers on how I could achieve this? Do I have to apply some sort of mask or otherwise to force the partucles into that form? Or would this be achievable in some other way? I don’t really understand Particle Systems but I have an artist who does, so if anything I could probably have him help once we get pointers (as he wasn’t sure how to achieve this).

Add a TrailRenderer component. I think its default shape is pretty close to your drawing.

Experiment with the Lifetime and the Width curve properties.

2 Likes

Didn’t know of this component. Will give it a try, thanks!

So I tried it out, but it’s not quite there. Almost though.

As you can see above, it freaks out at random times. Either when it’s at low speeds, bounces or even at high speeds some times. It’s placed on an empty game object that’s a child of my player Character so that I can place it behind the ball. Otherwise it’s on top of the ball and that doesn’t look good.

Yeah…you can really freak out the trail mesh and illustrate the issue if you just scrub it along one axis
3055094--229373--upload_2017-5-2_16-25-16.png(5.6.0f3)
light jiggle on Z with 8 corner and 3 end cap

Okay, will give that a try when I get to it.

Yea, that’s a problem but…how do I fix it?

Hrm, well you could try multiple trail renders

  • turn one off if it flips vectors abruptly
  • then turn on a new one

not a perfect solution in my quick test shows

  • you can get more sophisticated by tracking the trail outside of the object, rather than parented
  • add some ease rather than a hard de-activation
2 Likes

So I figured out that, apparently an animation was causing the sprites Z-scale to go between 1 and 0 over time, making the trail freak out a lot. This was mostly fixed, by making sure that Z-scale didn’t change. Now it only got a few outbursts here and there, which is acceptable.