Mecanim smooth transition from arbitrary time in animation


I’ve been trying to make a smooth blending from one animation to another from any point in time. What I have is the following: One attack which should combo into another attack. This is currently done in mecanim by setting a trigger to transition to the next attack instead of to the exit node. Now this works really well as long as the player presses the combo button before the transition’s Exit Time is reached. However to keep a nice feeling the animations have some lag at the end before the character will either follow up with another attack or return to the idle state.

Ideally a player would be able to queue up the next attack at any time during the animation before the animation starts returning to the character’s idle state. So if the player pressed the button early, the animation would transition as soon as possible, but if the player pressed during the lag part of the animation, the next attack would be slightly delayed instead.

The problem in mecanim is that if the Exit Time is passed, which is currently at the start of the lag time of the character, it is not possible to transition smoothly anymore. Currently the only solution i found was to force the animation the Play function but this obviously results in broken animations since it’s not smoothed/blended anymore.

The problem is you need two outcomes with a IF statrment. Two outcomes - both instant transition (has exit time) and a queue wait for animation end (no exit time).

This is an interesting problem.
Could your current set up add a variable - if input is given within X seconds = instantly transition OR if input happens after X seconds = wait for current animation to end then transition to next queued animation.

This is plane language because Im not a programmer.