Skip to content
Download
API reference

ProceduralNodeSpawnCurve

Inherits: ProceduralNode < Resource < Shared < Object

Draws a line through the points: Line2D, Path2D or Path3D.

Roads, rivers, fences: a Line2D (or a Path2D with NODE_PATH) in 2D, a Path3D in 3D, through the points that reach it, in their order or by order_attribute. Points with another value of group_attribute make another line: with a ProceduralNodeCurveSampler whose ProceduralNodeCurveSampler.curve_attribute and ProceduralNodeCurveSampler.distance_attribute are set, each curve of the graph becomes a line. At runtime each cell draws its part.

TypeNameDefault
boolclosedfalse
ColorcolorColor(1, 1, 1, 1)
StringNamegroup_attribute&""
intnode_type0
StringNameorder_attribute&""
Texture2Dtexture
floatwidth8.0

  • NODE_LINE = 0 — A Line2D.

  • NODE_PATH = 1 — A Path2D.

bool closed = false

Setter/getter: set_closed(), get_closed()

Joins the last point to the first.

Color color = Color(1, 1, 1, 1)

Setter/getter: set_color(), get_color()

The colour of a Line2D.

StringName group_attribute = &""

Setter/getter: set_group_attribute(), get_group_attribute()

Points with the same value make one line. Empty: one line.

int node_type = 0

Setter/getter: set_node_type(), get_node_type()

In 2D, what it makes: a Line2D (seen) or a Path2D (to follow). In 3D, always a Path3D.

StringName order_attribute = &""

Setter/getter: set_order_attribute(), get_order_attribute()

The order of the points along the line (for example the distance along the curve). Empty: as they come.

Texture2D texture

Setter/getter: set_texture(), get_texture()

A texture tiled along a Line2D.

float width = 8.0

Setter/getter: set_width(), get_width()

The width of a Line2D.