Skip to content

Querying Voxel Data

A brief rundown on how data from the voxel world can be queried from gameplay code.

Any data from the Voxel World can be queried from gameplay code using the Query Voxel Layer and Multi Query Voxel Layer nodes. The two nodes do the same thing, but a multi-query queries multiple positions at the same time.

Query nodes output a struct containing the distance of the assigned volume layer (or height in the case of a height layer), as well as the surface type (returning the highest-weighted surface type, unresolved will output smart surface types, resolved will output the surface type selected by the smart surface types) and normal at the given position(s). Metadata can also be queried by making an array with the relevant metadata assets plugged into the Metadatas to Query pin. They'll then be part of the Metadata to Value map in the output struct.

Image
The two Query Voxel Layer nodes and their async counterparts, with the output struct broken out into its contents.