For a long time I wanted to add this one to the api:
Away supports now smooth transitions between actual and new animationSequences!
Works for md2, animated AS3 exports and native Animator mesh animations.

When you have an animation running of an avatar walking, if you now
play(new AnimationSequence({rollonthefloor}); before the update, your avatar will go from the actual "walk" sequence to the first frame of the "rollonthefloor" sequence", causing a sharp transition.
Fixe until now was to add keyframes.
In the new situation, the current "walk" state is saved and interpolated into the "rollonthefloor" sequence. The "rollonthefloor" is not waiting until the morph is done, it plays as usual, except it gets that "old" information gradually mixed into its actual state. Visually the transition is smooth.

The interpolation ratio is 0/1 based. Its automatic, and nothing needs to be programmed if you are happy with the default settings. The defaultvalue is set to 10. So interpolating value is default .1 -- > 1/10;
You can change this value accessing Mesh class.
Works only when the animationSequence.smooth is set to true.

like this:
(myAnim as Mesh).transitionValue = 20;
--> will give you .05; --> 1/20
The interpolation will last 20 renders.

The fx you get is directly linked to your animation and how fast the swf is running, it will update each time the updateTime() scene method is called. Therefor, like for your animations there are no rules but your feeling and talent to get the balance right.

Happy animation :)

Fabrice

Reply via email to