Line Actor and Component
Lines Plus for Unreal · Line Actor and Component
The Lines Plus actor and the Lines Plus component draw one line through a list of points. They have the same settings, in the Lines Plus category of the Details panel. The header of the category shows the number of points and the length of the line.
Settings
| Setting | Description |
|---|---|
| Points | The points of the line, relative to the component. A point added with the + button continues the line in the direction of its last side. A point inserted between two points goes to the middle. |
| Closed | Joins the last point with the first one. A closed line needs three points at least. With two points it is drawn as an open line. |
| Smooth | Draws a smooth curve through the points. |
| Subdivisions | The number of sections of the curve between two points. It is used with Smooth. |
| Visible Start | The start of the part of the line that is shown. 0 is the start of the line. |
| Visible End | The end of the part of the line that is shown. 1 is the end of the line. |
| Draw on Begin Play | Plays the draw animation of the style when the game starts. It needs a Draw Duration above 0 in the style. |
| Style Asset | A style asset shared with other lines. With no asset, the line uses the style settings of the component. |
Visible Start and Visible End show only a part of the line, for example a route that appears while the player moves or a progress bar along a path. The draw animation changes the same range. Visible Fade in the style gives the edges of that part a soft fade.
The groups Shape, Color, Pattern, Caps, Label and Animation under these settings are the style of the line. See Style Settings.
Edit the points in the viewport
- Select the actor to see its points as yellow rings. Click a point to select it and move it with the gizmo.
- Right-click a point and select Add Point to add a point after it. The new point is placed between the selected point and the next one.
- Right-click a point and select Delete Point, or press the Delete key, to remove it. A line keeps two points at least.
Functions of the component
You can call these functions on the component from Blueprints and from C++.
| Function | Description |
|---|---|
| Set Points | Changes all the points of the line. The points are relative to the component. |
| Set Point | Changes one point of the line. |
| Set Style | Changes the look of the line. The line stops using its style asset. |
| Set Style Asset | Changes the style asset of the line. |
| Set Color, Set Width | Change the color or the width of the line. The line stops using its style asset. |
| Set Visible Range | Shows only a part of the line. 0 is the start of the line and 1 is the end. |
| Play Draw Animation | Draws the line from start to end in a number of seconds. |
| Play Erase Animation | Erases the line from start to end in a number of seconds. After the animation the line is empty until you call Play Draw Animation or Set Visible Range. |
| Get Length | The length of the line. |
| Get Point At | A position on the line, in world space. 0 is the start of the line and 1 is the end. You can use it to move an object along the line. |
| Get Active Style | The style in use, from the style asset or from the component. |
| Rebuild | Builds the line again. Call it after you change a setting of the component directly from code. |
Suggest an improvement
Help us improve this documentation page.