Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

VoxelChunk

Marvin Fischer edited this page Apr 4, 2019 · 1 revision

VoxelChunk

How does it work

On initialising a BlockType[,,] VoxelIndex gets generated that contains the type of every block in a chunk, even the empty ones (BLOCK_AIR).

When NeedsUpdate is set the Coroutine gets started that syncs the actual voxel grid to the VoxelIndex, creating and destroying changed voxels. Afterwards the MeshCombiner picks up all active chunks and combines them to the final mesh, updates the MeshCollider and populates all that.

Clone this wiki locally