I am writing a 2d game (in libGDX, but I think that doesn't matter too much). In that game I want to have smooth transitions between animations. For example, let's think of a guy walking around. Now that guy is hit by something (a bullet for example) and dies. So I want to play the death animation for this guy now.
The problem: I cannot simply exchange the walking animation by the death animation, because the guy's current walking animation frame is not necessarily the same as the first frame of the death animation. So for the player that would look as if the animation "jumps" from walking to death.
So my question is: what is the "typical" way to achieve a nice and smooth transition from animation to another, in general?