- Home /
Digging through a voxel landscape
I've got a surface I can dig through using voxels and marching cubes. What I want to do is determine if an object has been uncovered, to enable it to be picked up.
The two ways I can think of are:
Using the voxels inside the object to determine what % of them are cleared inside the object. Problem with this is my voxel volume is very low res at the moment.
Using a collider and acting when its no longer colliding.
I'm a bit of a Unity noob though, and don't know if an object will collide whilst inside another mesh, or just as it hits.
I'm trying to implement Octrees on my voxels to stop me looping through a regular grid. 10x10x10 (1000 units) is very quick, but 20x20x20 is very slow (8000 units).
Using octrees will give me a much higher density, and allow the first method, but I think using the collider would be better.
Can anyone help at all?