animation direction considering orientation change