Linerenderer equivalent in UE4

Hi guys, I want to draw a path of a character in Unreal. I’d like to give something like a linerenderer an array of positions, and it just drawing between those points.
Now this doesn’t exist in Unreal, and I’ve read here that I need to use a particle effect, but I can’t seem to figure out how to set the target position of the beam particle to what I want.
I’d like to avoid using blueprints but if that’s not possible then I just have to deal with it.
Can anyone help me with this?

Hey FalconKrunch, I will move this thread to Rendering section, it’s more like rendering issue :slight_smile:
Also, check out this tutorial, I think you may find it helpful

Also, if you’re c++ programmer then try to dig DrawDebugLine stuff, there is some line rendering, but afaik it’s working only in Debug and Development builds.

Yeah I can’t use the debug lines for this as they don’t appear in production builds.
But the particle effect properties aren’t accessible from C++ so I’m not sure if it supports me setting the target vector manually from code.

It can be done using splinemesh too…

I think this is what you are looking for.

They are, I’m using them:


You feed an Emitter Index and Beam Index to each one. It’s not the easiest thing to set-up, but it does work. These functions also exist in Blueprint for ease-of-use/prototyping. Here’s how I’m using them for something.

Note however, that the Tangents are based on Bezier Math. It’s therefore easier to create a Spline Component, and then set the tangents to the same tangents as the Spline, like so (as a FOR Loop, hence the ‘i’):

                PS->SetBeamSourceTangent(0, InputSC->GetWorldTangentAtDistanceAlongSpline(InputSC->GetDistanceAlongSplineAtSplinePoint(i)), i);
		PS->SetBeamTargetTangent(0, InputSC->GetWorldTangentAtDistanceAlongSpline(InputSC->GetDistanceAlongSplineAtSplinePoint(i + 1))), i);