Why don't you just give the character multiple movements and switch movement when it's touching the wall?