# How can I create an “afterimage” effect like this one?

How can I make an effect like this? With a particle system?

• Create a new particle system
• In the general settings:
• "Start Lifetime" reduce a lot. The lower, the lower the length of the particle trail. In my example I am using 0.2.
• "Start Speed" to 0, so the particles don't move from where they were created.
• "Simulation Space" to "World" so the particles don't move when the parent moves
• "Emission":
• Controls the number of after-images in the trail. In my example I increased it to 100. Should be at least 5 / StartLifetime to avoid flickering.
• "Shape"
• Uncheck this module, so all particles are spawned at exactly the position of the particle system
• set the gradient to fade from 255 alpha to 0 alpha so the trail-sprites fade out over time
• In Renderer
• Create a new material with the shader "Particles/Alpha Blended"
• Set the desired sprite as the sprite of that material
• Assign that material to the Renderer
• Optional: Adjust start lifetime and emission amount to taste to control length and density of the trail.

Result when you move the object:

• i cant set the color over lifeime – jojo Mar 25 '16 at 15:40
• thanks! is there any tutorial in the material part? because i really dont know how to implement one. Sorry newbie here – jojo Mar 25 '16 at 15:48
• @JarellGabon Creating the material is quite straight-forward, actually. In the assets folder structure, Right-Click->Create->Material, select the new material, under "Shader" pick Particles->Alpha-Blended and then drag your sprite to "Texture". – Philipp Mar 25 '16 at 15:53
• @JarellGabon Regarding setting the alpha property of the gradient: In the gradient-editor, click the upper-right arrow and then drag the alpha-slider to zero. Screenshot. – Philipp Mar 25 '16 at 15:58
• @FSic Maybe you would like to post an own answer explaining how to do this with the TrailRenderer component? – Philipp Jul 3 at 7:56

You can achieve this sort of effect pretty easily. You don't have to use a particle system to do so, but it can work pretty well. The structure is:

• You want a system that emits a single stationary particle (zero velocity) at a fixed interval.
• Configure the particle so that it decays over whatever period of time you want (this will be the time it takes each afterimage to "fade out"), and is spawned with whatever the current animation frame is.
• Tie the decay of the particle to it's opacity, so it gets more transparent as it approaches the end of its lifetime.
• Hi dude, i get your point but im new to unity, can you give me specifics? thanks – jojo Mar 25 '16 at 15:39
• Add unity tag then. – Ocelot Mar 25 '16 at 16:26
• No, don't add the Unity tag. There's nothing about the question that is Unity specific; we don't want to have tons of "how do I do <the same thing> in <fifteen slightly different tools>" questions floating around. Toolset-specific answers like @Phillip's excellent post on this question are fine, and address that need well without making it exceedingly difficult to deal with duplicate questions. – Josh Mar 25 '16 at 16:28
• @JoshPetrie Just because your answer isn't unity-specific doesn't mean the question isn't either. I find it quite unfair of you that you remove the Unity tag after I gave a very unity-specific answer. – Philipp Mar 25 '16 at 17:28
• @Philipp I removed the tag before I saw your post, and there is still nothing in the post that is specific to Unity, nor should there be. Your answer is still perfectly valid. I'll make a post on meta about the large issue, since I can't find the discussion I thought we had on this already. – Josh Mar 25 '16 at 17:32