From what I’ve read animation montages are the way to go for setting up a meele combat system, and it has been working out well for me so far. There’s only one problem I have encountered and I couldn’t find anything about it online. In montages you can set up blend in and blend out times, which works great, except for when the montage is supposed to blend into itself while already playing. What I want to do is to be able interrupt an animation by playing it again, with a smooth transition in between. I even tried making a duplicate of the same montage, so that I can alternate between the two, but the transition between them still happens over only one frame (no matter what blending times I set). It would probably work if I duplicate the animation and flipflop between them, but I would rather not resort to such an inconvenient solution.
Am I missing something here? How can I interrupt the currently playing anim montage with itself, without a 1 framed transition? Here’s how the slot is set up in the anim graph.
Any help is appreciated, also it shouldn’t be too hard to set this up if you want to try yourselves. You just need to overwrite a montage by playing it while it’s already playing.
SLOT GROUPS.
The problem is that unreal only allows one montage at a time in the same slot group on the same skeletal mesh. But you could get around that by creating a second slot group, chaining two slots, one in each group, and play the second montage (duplicate of the first one) in the second slot, so it would not interrupt the first montage. It’s not nice that you need a clone of the montage for that, but if it’s a simple montage you can instead use [Play animation as dynamic montage], playing the same animation and assigning the slot dynamically from blueprint/code. If it’s a compound montage with loops etc, you need to duplicate it.
So that would not interrupt the first montage, which sounds like another problem, but might be fine (see below).
The other part of the problem is, as you noticed, montages do not fade out nicely when interrupted; they just cut.
BUT if your montages are not additive, that might be fine! As the second montage is fading in in the second slot, it would gradually fade out its input, that is, the output of the first slot, creating a crossfade. And you can abort the first one manually on the end of the fade in, or on an animnotify when you are sure it’s fully suppressed by the second one.
Let me know how it goes