A lot of people just work out the slope factor, like - if you work out the distance travelled in that loop, and divide the height difference by that, you have your slope factor - maybe possible to slide with that as well.
I would make a function that takes 2 sets of 2D XZ coordinates, works out the slope factor, and returns a 1 if the slope is too steep. Then, with a cross axis check, you could have it slide around slopes as if they were solid walls - rather than just stopping dead. You could store the previous 2D location, and pass that through the slope check function, if the slope is too steep, you can check the previous location on each axis seperately.
All you would need is a way to check the height of the level, sparkies line intersect check is ideal for this, as Mobiius said.