keep the player inside the window.