Make the player dig a hole into the terrain?

Hi, i am (attempting to) make a pirate style treasure hunt game, this involves searching the terrain and doing various things collecting maps which show you where treasure is, what i would like to happen is when you think you are where the treasure is you can dig a hole. I would like it so at first you make a little dint in the terrain and the hole keeps on getting bigger every time you click the terrain. Just to clarify for the game i am using the first person character controller that comes with unity :slight_smile:

Thanks for any suggestions!

Since Unity doesn’t really support mesh deformations, I’d suggest putting separate meshes as layers inside the hole which you can hide sequentially on user interaction.

If you are looking for a realistic hole then you need some sort of voxel terrain with surface nets or marching cubes, if you are using unity’s terrain you can at best change the position of vertices on your vertical world axis, i’m not sure if unity lets you edit the terrain in realtime but i don’t see a problem of finding the closest vertice and tell it to sink in, this tecnique is highly dependable on your terrain resolution and might look awful in a lot of situations, voxel terrains on the other hand look pretty good but are an advance topic and heavy on cpu