Foot Contouring/Adjustments

So if you ever played a third person game you’ve probably realized that when you walk up a hill and feet contour with the hill’s angle and same concept for stairs. So I’ve been wondering how to achieve this, I couldn’t find a tutorial anywhere so I’m guessing it’s alright to ask here…

This is my first post on BA…