I would recommend making it not get stuck in the wall. Happy to help.
If this answer was not helpful, then I suggest you consult the How to Ask Better Questions guide. You need to provide at least some information. From this question, I can't even tell whether your game is two or three dimensional. Show your work. Post some code. Actually ask a question instead of just making a statement.