fix infinite loop rotation problem in animator