Terrain that compresses when player walks over it

Hi - I was wondering if anyone could give me any pointers on the best way to create the effect that when the player moves over the terrain, it deforms or compresses.

Should I create a plane in Blender and apply animations to different areas of the terrain, and call these animations in Unity when the player is close to them?

I just thought I’d ask if this was the best way of going about it, as I’m still quite a noob (and slow) at unity.

Best, Laurien

You can just write to the terrain height map directly with TerrainData.SetHeights, you might want to keep the original heightmap data so that you can bounce the terrain back up (otherwise the player can keep walking until it all is down).

But to prevent everything looking very rough you are going to end up with a very high detail terrain mesh in a small area. A better way would be to represent the result with shaders by writing a series of decals to the normal map with techniques explained here.

Or watch this tutorial footsteps as long as you don’t actually need the terrain to be physically affected.