What is the easiest way to create a visual effect for line traces?

I guess I can get away with just using the red lines but that in and of itself is not ideal. I kind of just want an easily replicated graphic effect that I can modify in simple ways for things like predicting where a grenade will go when you throw it or a rail gun beam effect. Or being able to display where players are looking when you are in spectator mode like in CS:GO.

Can anyone point me to how I can learn more about doing something like this?

Beam particles probably is the best option for this.

Ah ok so that is what its called! Thanks! I was searching all kinds of stuff and couldn’t find it.

I have a beam particle system functioning now but I will be damned if I can get the beam to vanish after 0.1 seconds.

Can anyone here explain how to get the beam to go away?

edit: Literally nothing I do right now makes the beam actually go away… This should be super easy what the heck is going on?

edit: I had to set it to looping in order to make it so that it kills on deactivate. That is the most unintuitive thing probably ever.

There is the particle trail that I would say is a better idea potentially. You just attach it to a moving object such as an invisible sphere that you animate along your trace.

Beam particles, you add beam data component in particle editor.
Then you make your beam.

I found out that to give start and end points easiest is by using 2 blueprint nodes:
SetBeamTargetPoint/index.html
SetBeamSourcePoint/index.html

You can do this trough parameters, but then you lose preview in particle editor, and passing those variables over to beam emitter is kind of shaky

Ps. Do not develop your particle effects too much currently, by time most of us finishes game/project Epic will release niagara.

I merely need a visual effect for weapons like rail guns and lightning guns. I was tempted to just figure out a way to draw debug line traces as that is something that does exactly what I need but Its kind of a tough call. I don’t know if its worth drawing more traces to do a visual effect like that.

Also a particle is a bit more flexible for stuff too.

so now I am running into a problem where the particle effect only replicates if the trace does not hit anything. But that is only true for multicast.

If I tell the trace to draw on the owning client then it works in both cases but nobody else can see the effect.

sigh