You should c_trace into the direction the player wants to walk before walking, and if there's something in the way, don't animate. it looks weird if you run into a wall and still the character runs his walk cycle, so his feet slide across the floor.
~"I never let school interfere with my education"~ -Mark Twain