Blending animations

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hrohibil
Posts: 380
Joined: Thu Nov 04, 2021 12:50 pm

Blending animations

Post by hrohibil »

Hello there

In my sequencer i use AnimatorPlay to play a specific animation. But it ends before the text is read and transitions to the next animation in its node tree.

Can I do one of following:

A)
Keep looping the first animation until user either clicks continue or at least until it continues to next node tree?

B)
When it goes from one transition to another, can I make a smooth blend between the animations
Because now it just jumps without blending . Or is this something entirely done in the animator?
Because if I connect them as normally would do in order to get blending animations, then I have the above A dilemma. Which means AnimatorPlay plays the specific animation but don’t loop and the animator just goes to next animation.

Thank you 🙏
User avatar
Tony Li
Posts: 22655
Joined: Thu Jul 18, 2013 1:27 pm

Re: Blending animations

Post by Tony Li »

Hi,

> A) Keep looping the first animation until user either clicks continue or at least until it continues to next node tree?

Set the animation to loop, without any automatic transitions out of it. To play the next animation when the conversation continues, use "@" timing such as:

Code: Select all

AnimatorPlay(FirstAnim);
required AnimatorPlay(SecondAnim)@Message(Continued)
This will play Firstanim right away. It will play SecondAnim then the conversation continues.

> B) When it goes from one transition to another, can I make a smooth blend between the animations?

You can either use a transition (e.g., AnimatorTrigger() to set a trigger parameter) or specify the cross-fade duration in the AnimatorPlay()/AnimatorPlayWait() command. See the command reference.
Post Reply