Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

heightfield

heightfield(options): HeightfieldShape

A grid of heights in metres, rows samples along z by columns along x, listed row by row, over size, its width along x and depth along z, centred on the entity: a game’s own terrain, as the core builds a map’s. A fixed body takes it, which the body’s type holds.

Parameter Type
options HeightfieldCellsOptions

HeightfieldShape

heightfield(options): HeightfieldGridShape

A heightfield from the same entity’s two-dimensional grid, rebuilt at the next physics sync after its heights change. Grid x is world x; grid y is world z. size is its full width and depth, centred on the entity.

Parameter Type
options HeightfieldGridOptions

HeightfieldGridShape