terrain alteration a.k.a. digging

I know digging digging is impossible in unity, although is there any possible form of in-game terrain alteration, for example lowering the terrain at certain point by certain amount, maybe with certain radius - just like using brushes in the terrain toolkit.

Also, about the true digging part, is there any way other than making millions of game objects stacked one on each other that disappear on mouse click? that would probably kill my pc, unless new objects would appear only after previous ones were destroyed. That would keep their number at the same level (which is bad anyways)

  • Yes, modifying a terrain mesh, or any mesh at all, is possible in game. There is even an example provided by unity on the subject.

  • Yes, it is possible to create a
    minecraft clone in unity by
    creating/placing objects proceduraly
    using prefabs and

  • You can simply use a Raycast to
    find the gameobject in the center of
    the screen/at the mouse
    coordinates/on the other side of the
    gun/etc. and then work with and on
    that object.

  • It shouldn’t be too hard to only make
    the blocks appear when an adjacent
    one is destroyed.

All of these things are possible. You just have to do the actual work yourself.

If you don’t mind dropping a little cash on it (it’s pretty inexpensive, for what it does), then VoxelForm is a turnkey solution:


Here’s the demo:

Terrain Destruction is a simple cheap package which can dig holes at runtime.