How do I make Mesh Deformation based on collision?

Hi I’m currently trying to make a Mesh Deforming Tank Tracks but the problem is I don’t know how to set up a Mesh Deformation with a Script. And this is what the collision should look like based on the Mesh Deform: