I’ve been porting a project from Unity to Unreal Engine, and not finding any line renderers anywhere, I made one, which I’ve open sourced.
It’s at GitHub - perholmes/UnrealLineRenderer: Unreal Line/Spline Renderer, with a permissive license.
Features:
- Smooth spline or simple line.
- Automatic tangents draws a smooth line through points.
- Spline is tessellated with a quality setting.
- Geometry is created using UProceduralMesh.
- Geometry automatically orients towards camera or custom Up vector.
- Hard corners on line maintain mass.
- Selectable arrowheads.
- Rendered control points.
- Hit detector that detects control points or point on spline from screen coordinates.
- Multiple styles, such as dotted or dashed lines, or animated materials.
- Efficient update cycle that recalculates as little as possible.
- Configurable line width and arrowhead size.
- Animation functions for getting linear movement along spline.
- Shot Designer-specific feature to draw lines next to main line to illustrate camera movement. Just ignore.
Anyway, I hope it helps someone. This line renderer is somewhat specific to our project, but if anyone is interested in putting some work into generalizing it further, it could be a proper, all-purpose line/spline renderer for Unreal Engine.