Stop player from going outside the canvas