Overriding Animations with Animation Montages in Unreal Engine

- by

Animation Montages can be inserted into running animations when we feel something else needs to happen before the previous animation can continue. A good example is weapon recoil that happens as a result of firing a bullet: rather than switching to a completely different animation, we just cut to the montage for a moment before going back to the previous animation in progress. Blending happens seamlessly (or not if we prefer).

First we need an Animation Sequence object. From the asset browser on the right, we drag in the animation we want to queue. This will be dragged onto a “slot” we can later specify, aptly titled “default slot” by default. Take note of the blend in and blend out times in the sidebar on the left. Those values determine how much blending is applied at the transition to the montage and back.

You can create your own slot on the right under Anim Slots. In my example I’ve created a Weapon Slot, but the default will work just fine. If you don’t see the Anim Slot Manager in the sidebar, head over to Window – Anim Slot Manager and make it magically appear.

In our Animation Blueprint, we can now insert a slot before the output pose is generated. To do this, drag off your entry point or state machine and search for “slot”.

If you’re using your own slot, click on it and pick your slot name from the right hand details panel.

We’re now ready to play our montage. In my example, I’d like to make this happen when my character fires the weapon. In fact, I have two animation montages setup, one when the weapon is held casually at the hip, and another when the weapon is aimed. I can play either one of them, depending what’s needed for my situation:

Now we get a nice subtle recoil effect every time the weapon is operated.

If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment