Skip to content

Components

Line

A stroked line drawn through a list of points: a rope, a cable, a beam, or a grapple's line stretched between two points that move every frame. Set its width, colour and how joints and ends are finished.

On this page

Add it

+ Add node → Line creates a node with it already on. Already have a node for it? Add component → LineComponent.

From a script

A script on the same node writes these fields by name. LineComponent is the name to pass.

rgs
set_number("LineComponent", "width", 4.0);
set_colour("LineComponent", "color", vec4(1.0, 1.0, 1.0, 1.0));
set_flag("LineComponent", "closed", false);

Fields

FieldScript nameKindDefaultWhat it does
PointspointslistemptyThe points, in order, in local units.
Widthwidthnumber, at least 04Stroke width in local units.
Colorcolorcolour#ffffffTint colour, alpha included.
Jointjointone of Flat, Round, RoundCapsFlatHow corners and ends are finished.
ClosedclosedcheckboxoffWhether the last point joins back to the first.
Sort Layerlayernumber0Lower draws first.