Blueprint Nodes
Lines Plus for Unreal · Blueprint Nodes
The nodes are in the Lines Plus category. In C++ they are the static functions of the class ULinesPlusLibrary, in the header LinesPlusLibrary.h. Every draw node returns a handle, a value that you keep to change or to remove the line later. The nodes do nothing with the handle of a line that does not exist. The nodes also work in the editor without Play, for example in an editor tool.
The draw nodes have a Style pin. A node with nothing in this pin draws a white line with the default settings. To change the look, connect a Make Lines Plus Style node or the Style value of a style asset. The draw nodes also have a Lifetime in seconds: the line is removed after that time, and a lifetime of 0 keeps the line.
Draw
| Node | Description |
|---|---|
| Draw Line | A straight line between two points. |
| Draw Polyline | A line through a list of points with straight sections. Closed joins the last point with the first one. |
| Draw Curve | A smooth curve through a list of points. Subdivisions is the number of sections between two points. |
| Draw Bezier | A Bezier curve between two points with two control points. |
| Draw Spline | A line along a spline component. Segment Length is the length of each section. |
| Draw Segments | Many separate straight lines with one call and one handle. Each pair of points is one line, with the caps of the style at both of its ends. Use it for grids and wire shapes. With a visible range or a draw animation, all the lines of the group are drawn at the same time. With an odd number of points, the last point is not used. |
| Draw Circle | A circle with a center, a radius and a rotation. The circle lies on the XY plane of the rotation: with no rotation it lies flat, and a pitch of 90 degrees makes it stand up. Segments is the number of sections of the circle. |
| Draw Arc | An arc of a circle between two angles, in degrees. Angle 0 is on the X axis of the rotation and the angles grow toward its Y axis. |
| Draw Rectangle | A rectangle with a center, a size and a rotation. Size is the length of its two sides. |
| Draw Box | The twelve edges of a box, with one handle. Extent is half the size of the box. The edges have round ends, so they meet cleanly at the corners. |
| Draw Grid | A grid with one handle. Size is the length of its two sides and Cells is the number of cells along each side. |
| Draw Trajectory | The path of a projectile launched from a point with a velocity. Max Time is the longest time of flight, in seconds. With Stop at Hit, the path ends at the first surface that blocks the Trace Channel, and the node returns that hit: its Impact Point is the place where the path lands. The path does not hit the Ignored Actor, for example the actor that shoots. Gravity is the vertical acceleration, negative to fall, and 0 uses the gravity of the world. To make the path land on a target, get the velocity with the engine node Suggest Projectile Velocity Custom Arc. |
| Update Trajectory | Updates a path drawn with Draw Trajectory, for example when the aim changes. It returns true when the path hits something. |
| Draw Link | A line between two components that follows them when they move. Each end is at the origin of its component, or at a socket of the component. The line is removed when one of the components is destroyed. The line moves once per frame, so Get Line Point and Get Line Length return the values of the last frame. |
Change
| Node | Description |
|---|---|
| Set Line Points | Changes the points of a line. The points are world positions, also for a line attached to a component. To add a point to a line, send the whole list again. |
| Set Line Ends | Changes the two ends of a straight line. |
| Set Line Style | Changes the look of a line. To change one setting, read the look with Get Line Style, change the setting and set it again. |
| Set Line Color, Set Line Width | Change the color or the width of a line. |
| Set Line Opacity | Changes the opacity of a line, over the alpha of its color. |
| Set Line Visible | Shows or hides a line. A hidden line still exists. |
| Attach Line | Attaches a line to a component, so the line moves with it. The line keeps its place in the world at the moment of the call. The socket is optional. |
Animate and remove
| Node | Description |
|---|---|
| Set Line Range | Shows only a part of a line. 0 is the start of the line and 1 is the end. |
| Play Draw | Draws a line from start to end in a number of seconds. |
| Play Erase | Erases a line from start to end in a number of seconds. The line still exists after the animation: call Play Draw to show it again, or Remove Line to remove it. |
| Set Line Lifetime | Removes a line after a number of seconds, with the Fade Out Duration of its style. 0 keeps the line. |
| Remove Line | Removes a line. |
| Remove All Lines | Removes all the lines drawn with the nodes. The lines of actors and components stay. |
Information
| Node | Description |
|---|---|
| Is Line Valid | True while the line exists. |
| Get Line Length | The length of a line. |
| Get Line Point | A position on a line, in world space. 0 is the start of the line and 1 is the end. |
| Get Line Style | The look of a line. Use it to keep the look of a line before a highlight and to set it again later. |
| Equal (Lines Plus Handle) | The == node for two handles. It is true when both refer to the same line. |
| Get Line Count | The number of lines drawn with the nodes. |
| Get Group Count | The number of meshes that draw those lines. |
| Make Simple Style | A style with a color and a width. |
| Make Curve Points | The points of a smooth curve through a list of points. Use them with Set Line Points to update a curve. |
| Make Circle Points | The points of a circle or of an arc. Use them with Set Line Points to move or to change a circle. A full circle does not repeat its first point, so use it with a closed line. |
| Snap Points to Ground | The points of a line placed on the ground under them, with one point every Spacing units at most and at the height Offset above the ground. The ground is the first surface that blocks the Trace Channel, from Trace Up units above each point to Trace Down units below it. A style can do the same with Snap to Ground. |
| Find Line Under Cursor | The line under the mouse cursor and the point of that line, with a tolerance in pixels. Use it to select or to highlight lines. |
| Find Line at Screen Position | The same for any position of the screen, for example a touch. |
| Find Line Near Ray | The line nearest to the start of a ray. Tolerance is the largest distance from the ray to the side of the line, in world units. |
The find nodes search the lines made with the draw nodes. They do not search the line actors placed in a level.
The style asset has one node of its own, Update Lines. Call it after you change the Style value of the asset from a Blueprint or from C++, so the lines that use the asset show the change.
See C++ for the use of the nodes from code.
Suggest an improvement
Help us improve this documentation page.