KybernetikGames / animancer

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

Can Animancer support Inertial Blending? #294

Open Lucipetus opened 1 year ago

Lucipetus commented 1 year ago

Use Case

When your character transits from one animation to another, sometimes you don't want the source animation to gradually fade away (in whatever curve). For example, when transiting from "waving" > "idle", you don't want the waving motion of the hand to linger until it completely fades away, instead the waving hand should stop going back and forth immediately, maintain the inertial of the last frame, and transit to idle. Same with "running" to "idle" I think, the legs should just stop switching.

Solution

Inertial Blending: https://www.gdcvault.com/play/1025165/Inertialization

Alternatives

An extra end of motion clip. Stop advancing the source animation frame while transiting. Apparently there's nothing I can do with Mecanim to achieve this. I'm wondering if there's an easy way to extend Animancer.

KybernetikGames commented 1 year ago

I've just posted a general roadmap of my current plans which includes Inertialization after the major Animancer update I've just started working on.

Animancer has a Custom Fade system which replaces the default linear cross fade with a custom curve and can make things look better in some cases, but doesn't really solve the issues you mentioned.

I expect Inertialization to be somewhat similar to the Custom Fade system (i.e. start a regular fade then tell the Inertialization system to steal it). As mentioned in the roadmap, that means it would only have a minimal point of contact with Animancer so while the "extending Animancer" part would be super easy, implementing the actual Inertialization system would be much more difficult.