Hello, I am making a game where the player runs and when he swipes the screen or hits left/right arrow on a keyboard, the player turns.
I could use transform.Rotate(0,90,0) but I want to make it kinda smooth, so I want to use an animation.
The problem is, that if I create an animation with two keyframes: transform.rotation.y = 0 and transform.rotation.y = 90, this happens:
Player turns right for the first time, the animation plays and now the y rotation is equal to 90.
Player turns right once more, but the animation doesn’t play from 90 to 180, but from 0 to 90 again.
How do I fix this?
I am not an English speaker, so please correct this question if necessary.
Thank you, imilanspinka