Changed so that animation works when player reaches middlepoint of screen