Dynamic Ledge Climb System

I think the controls should be so that if you are moving left, for example, on a ledge and come to a corner, keep pressing left should turn the corner. Or at lest how can we make it do that?

Thanks