I am having an issue where I want a widget to play a second animation after it finishes playing the first animation.
widget.setAnimation("Born",
{
complete:function(entry){
widget.setAnimation("Looping");
}
});
For some reason doing the above code will display a messed up frame of that doesn't exist in either animation? Even if I force the second animation to play the same animation as the first, it still plays an unknown frame?
The puff of smoke separates the 2 animations being played HOWEVER there is no puff of smoke in either animation? There is smoke in other animations though, just not the ones I am currently playing?
However, calling setAnimation inside a setTimeout will not show the unknown smoke frame but even when I set the timeout to 0, it will still play a second of the previous animation before switching.
widget.setAnimation("Born",
{
complete:function(entry){
setTimeout(function(){
widget.setAnimation("Looping");
},0);
}
});
Animation 1: The creature falls from a puff of smoke. Animation 2: the creature stands idle. However, there is a noticeable jump cut where you see the first frame of animation 1 playing (the creature in the air) before animation 2 plays (the creature standing idle) This makes the creature look like they jumped back up in the air for a fraction of a second.
Both solutions look very bad in my game. I have around 40 creatures each with 4 - 5 animations and they all look bad when transitioning from one animation to the next...