The interruptible window approach is exactly right, that's not overcomplicating it. That's basically how most action games handle it. You tag "cancel frames" in your attack data and only allow transitions out of those. The trick is tuning how generous those windows are based on the move. Fast light attacks should have early cancel windows, heavy attacks much later or not at all until near the end. Blend time within a cancel window can be very short, like 2-4 frames, because you're already at a reasonable pose to exit from.
Snapping vs blending when switching combat animations — when does each actually work?
Been banging my head against this for a while and figured someone here must have dealt with it. I'm working on a third-person action game with a fairly involved combat system, light attacks, heavy attacks, dodges, blocks, getting hit, dying, all the usual stuff. The problem I keep running into is deciding when to blend between animations and when to just cut hard.
For most transitions it feels obvious. You don't blend from idle into a walk, you just crossfade and it looks fine. But combat is where it starts falling apart for me. If my character is mid-swing on a heavy attack and the player inputs a dodge, do I blend out of the attack into the dodge? Because right now if I do a short crossfade it looks mushy, the weapon kind of floats weirdly and the character's weight feels wrong. But if I snap to the dodge immediately it can look jarring depending on where in the attack animation we are.
I've started trying to handle it by tagging specific frames in the attack animation as "interruptible" and only allowing a clean exit from those windows, which helps a lot. But now I'm wondering if I'm overcomplicating it and there's a more standard approach people use.
Also separately: what do you do when an enemy hit reaction needs to interrupt whatever the player is doing? Right now I'm just snapping straight to the hit animation and it looks pretty bad when it cuts mid-run. Is a very short blend (like 3-5 frames) actually the answer there, or is it more about having good entry poses baked into the hit animations themselves?
Using Unity with Animator, not a custom graph solution. Happy to hear thoughts from people on other engines too though.
For the hit reaction problem I'd go with both. A 3-4 frame blend AND making sure your hit animation first frames match a somewhat neutral pose. The blend takes the edge off the snap and the entry pose does the heavy lifting. 3 frames is short enough that players rarely notice the blend itself, they just notice it doesn't look wrong anymore.
Snapping cold from a full sprint into a hit stagger looks bad no matter what you do to the hit animation. A tiny blend saves you.
Something that helped us a lot: separate your "blend decision" from your "blend duration." The state machine decides whether to blend at all (based on those interruptible tags you mentioned), and then a separate lookup table determines how long the blend should be based on the source state and destination state. Dodge-from-idle gets 8 frames. Hit-reaction-from-attack gets 3. Hit-reaction-from-run gets 5. Lets you tune each case without touching the state logic.