Collision detection for character and improved movement