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

setVoxel

setVoxel(authority, entity, cell, filled, setVoxelOptions?): void

Fills or empties one cell of entity’s voxels collider, on the world authority decides for, as Rapier’s setVoxel does: the body keeps every other cell and every pair, and the change streams.

Parameter Type
authority EntityAuthority
entity Entity
cell VoxelCell
filled boolean
setVoxelOptions SetVoxelOptions

void

setVoxel(step, island, [4, 2, -1], false); // dug out