Flip the player based on movement direction