When I try removing voxels, I get these strange planes of terrain that are a pixel thick but are visible and block movement. Does anyone know why this happens? Below is my code for removing voxels, as well as some screenshots after calling the following method a few times:
Code:
void DestroyVoxels(int xPos, int yPos, int zPos)
{
MaterialSet emptyMaterialSet = new MaterialSet();
int range = 1;
for (int x=xPos-range; x<=xPos+range; x++)
{
for (int y = yPos - range; y <= yPos + range; y++)
{
for (int z = zPos - range; z <= zPos + range; z++)
{
terrainVolume.data.SetVoxel(x, y, z, emptyMaterialSet);
}
}
}
}



This black ball from the last image is what I use to select which voxel I have active, so that part is intentional.