How to animate roll?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sprowk
:warning: Old Version Published before Godot 3 was released.

Im trying to create roll animation of my sprite. However there is a problem when rotating over 360 degrees. I start at rot 2 and end at 362. The problem is when godot tries to blend this animation with next one (for example run → roll → run) it rotates back to rot 2 backwards. Is there any workaround or am I doing something wrong?

Is this in the AnimationPlayer? If so, have you tried adding in extra keyframes in between that are at 90 degree steps or less to help hint the direction you want to rotate?

avencherus | 2018-01-20 18:34

Yes, it is in AnimationPlayer. Thanks for your try even though it is not the problem I had to solve. I’ll post answer so other people know.

Sprowk | 2018-01-23 10:11

:bust_in_silhouette: Reply From: Sprowk

My solution is not elegant but did the job. I made step in animation very low value and at the end of the animation I added track with rot 2 and set transition of last 2 tracks to “jump” to next value (image of horizontal line).