The bouncing off the walls happens so the player won't walk through or get pushed through them
But i will check it out thank you :)