Infiniminer - style environment system.

So i’ve started working on an infiniminer style game where the player digs out blocks without ever reaching the bottom or the surface of the world.

the idea is that when the player(red arrow) removes block “A”, Blocks labelled here as “B” will surround the recently destroyed block minus the area that has already been dug out.

I’ve already made a raycast system for digging the blocks in C#, but im having trouble scripting the part that i’ve illustrated.

Any ideas/examples of how this could be done would be appreciated, Thanks!

J-F

Voxel world’s are somewhat challenging to code and render. Do a search for unity minecraft - and look at the way those guys handle voxels and rendering and changing them. It’s pretty complex!

This isnt really about terrain generation or even voxels, because the draw distance won’t be that large either.

What im attempting to do is a script that runs in the background and controlls all existing blocks(maybe by finding tagged objects?) and which allows more blocks to be created around a recently destroyed one, whitout filling the space that has already been dug out.