Best way to create bullet tracers for hitscan weapons?
Hi! My game uses hitscan weapons (line traces) for gameplay purposes, but i want the visual effects to look like actual traveling projectiles. I've tried several approaches but i always seam to run into problems related to fast-moving actors or particles. Beams are NOT what i'm looking for.
I'm currently trying to particles with a high initial velocity (5000), but i can't find a way to reliably make them stop where the line trace hits something. Calculating the lifetime of the bullets from velocity and trace length doesn't provide precision enough. Kill boxes also let particles slip outside the volume when they are moving fast. Particle collisions makes them stop in the right place but it seams risky to do an individual check not related to the trace.
I know that i'm not the first one trying to put tracer effects on hitscan weapons, how hve other devs managed to do it properly?
asked Nov 25 '15 at 10:57 PM in Using UE4
Answering myself because i hate this situation: https://xkcd.com/979/
I ended up going with beams anyway, since only they had the satisfactory precision. Then i feed beam life and length to the material, using those two and some math on the texture coordinates scroll the texture, creating the impression of a travelling projectile. Due to the curent state of beams in cascade, i have to use the Particle Color parameters as a conduit for life/length, since dynamic parameters doesn't seam to work.
answered Nov 28 '15 at 03:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here