Fixed an issue where the player didn't behave correctly when walking/clicking on the ground.