If you make the distance the player moves when you move, if the distance is longer than the wall is thick, simply pressing the opposite direction will clip through. Make sure to keep this in mind