API reference
ProceduralNodeSnapToGrid
Inherits: ProceduralNode < Resource < Shared < Object
Puts each point on the nearest corner of a grid.
Description
Section titled “Description”To place things on tiles: with offset at half a cell, points go to the centres of the cells.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| Vector3 | cell_size | Vector3(1, 1, 1) |
| Vector3 | offset | Vector3(0, 0, 0) |
| bool | recompute_seed | false |
| bool | snap_height | false |
Property descriptions
Section titled “Property descriptions”cell_size
Section titled “cell_size”Vector3 cell_size = Vector3(1, 1, 1)
Setter/getter: set_cell_size(), get_cell_size()
The size of a cell.
offset
Section titled “offset”Vector3 offset = Vector3(0, 0, 0)
Setter/getter: set_offset(), get_offset()
Moves the grid.
recompute_seed
Section titled “recompute_seed”bool recompute_seed = false
Setter/getter: set_recompute_seed(), get_recompute_seed()
Gives each point the seed of its new position.
snap_height
Section titled “snap_height”bool snap_height = false
Setter/getter: set_snap_height(), get_snap_height()
Also snaps the up axis.