How to display flying bullets (tracers)

Hello there,

i have a little question. How can flying projectiles be realized? I mean the bullet that flies from the end of the barrel to the position of the crosshair in 1st and 3rd person shooters. The visual realization.

Look at the screenshot below (its from Gears of War 3). There you can see a flying projectile when the weapon is fired.

How can that be realized in Unity? With particles or something else? How should the code for that look like? We use C#.

Any help is much appreciated.

Particles systems are an easy fix if you just parent it to the gun barrel. If you want to code it you can spawn a prefab bullet trail with the same position/orientation as the barrel and just iterate in the local forward axis, probably z. The trail itself would probably just be some textured plane or cylinder which you can also scale in the z to make it look like it grows after fired.

also you can try a trail renderer