Hello,
I want to turn my character with an animation in Mecanim.
I have a character with an animation “idle”, and animation “turnLeft”, “turnRight” and “walkForward”. I coded a controllerScript to modify the Direction parameters in my animator. And depending on this direction, the animation “turnRight” or “turnLeft” is launched.
The animations are working well, but once the animation is finished the character go back to its initial rotation.
For exemple :
The character start in the idle state. (orientation of 0 degres, looking north)
I pressed the left arrow, the “turnLeft” animation is launched. As long as the key is pressed, the character has an orientation of 90 degres (facing west)
I release the key, the character go back to the idle state. (looking north)
Is there a way to apply the rotation definitively? Or should I code a script that change the transform rotation of the character depending on the direction?
Thanks a lot.
