KybernetikGames / animancer

Documentation for the Animancer Unity Plugin.
65 stars 8 forks source link

How to "fade to first frame"? (Fade out the old clip, but pause the the clip at frame 1) #268

Closed kodra-dev closed 1 year ago

kodra-dev commented 1 year ago

I'd like to do a transition between animation clips. But instead of cross-fading, I'd like the new clip to stay at frame 1, until the old clip is completely faded out, then start playing the new clip. I don't want the two clips to play at the same time.

Is there an easy way to do this?

KybernetikGames commented 1 year ago

If the clip isn't looping, you could just set its start time to the negative of the fade duration so it will spend the fade going up from that value to 0 looking like it's frozen on the first frame.

If it's looping, you would need to start it at speed 0 to freeze it then use something else as a timer (or check each frame whether the fade is done) to set its speed to 1 so it starts playing.

kodra-dev commented 1 year ago

Got it, thank you very much!