Changed the charactor direction when player changed and revert the left and right when player up