Skip to content
Download
API reference

ProceduralNodeSnapToGrid

Inherits: ProceduralNode < Resource < Shared < Object

Puts each point on the nearest corner of a grid.

To place things on tiles: with offset at half a cell, points go to the centres of the cells.

TypeNameDefault
Vector3cell_sizeVector3(1, 1, 1)
Vector3offsetVector3(0, 0, 0)
boolrecompute_seedfalse
boolsnap_heightfalse

Vector3 cell_size = Vector3(1, 1, 1)

Setter/getter: set_cell_size(), get_cell_size()

The size of a cell.

Vector3 offset = Vector3(0, 0, 0)

Setter/getter: set_offset(), get_offset()

Moves the grid.

bool recompute_seed = false

Setter/getter: set_recompute_seed(), get_recompute_seed()

Gives each point the seed of its new position.

bool snap_height = false

Setter/getter: set_snap_height(), get_snap_height()

Also snaps the up axis.