I just got an idea that could work... but didnt test anything



concept:




Whenever you want to grab the edge you trace forward (TRACE 1) to check if you are standing at a wall.
If not trace downwards (TRACE 2) from where you traced to before, to check if there is a edge at all.
If so, then play your animation....


just a little hint, didnt test



nipx