Using Anim Layers in UE5

Make modular Animation Blueprints with Anim Layers

Sat, 24 Dec 2022

5.1 broke Anim Layers and you can not add any new ones. Check out this post to fix it

I used animation layers in my main players animation blueprint to allow easy dynamic switching of animations when changing weapons. Animation layers themselves are an interface that you put on your animation blueprint. Check out this video if you don’t know what an interface is.

With the animation layer, you can dynamically switch which layer your animation blueprint is using and that layer will pull the animation logic from that blueprint. Currently in my game I use it for idle animations and basic blendspace locomotion.

First thing you want to do is create a new Anim Layer Interface BP. parameters

Once you create it, click Add and name the new section in Idle. Thats all we need to do here

Open your main animation blueprint now and add a new interface. You do that by clicking Class Settings and scroll down to Interfaces. Add the interface you just created, it should look something like this.

parameters

On the left panel you should see this section populate if everything was done correctly

parameters

Now create a new animation blueprint that will hold the logic for the interfaces that the main blueprint will be using. I named mine ABPFemaleLayer and this holds my logic for female character movement. Once you create it, implement that interface like we did earlier and now we will add some logic to it. You can do that by clicking the Idle interface on the left hand side under Animation Layers. Once you do, put an idle animation in the graph to have it look like this

parameters

Now we swap back to our main blueprint where we will attempt to use that interface on the graph

What we want to do here is drag the Idle interface from the left panel onto the graph. You should have a new node that says Linked Anim Layer. Click on that node and change the defaults. In the Layer section you want this to be the layer that you want it to use which is Idle in our case. You can leave the Instance Class blank, however I like to set a default so I can test the blueprint in the editor. It should look like this

parameters

The final step is to add in logic to swap between layers. In my character BP I have this as a simple test. I have 2 different layer implementations set up, one is for female movement and the other is for movement with a bow. When you hit the F key, my character will swap between the animation layers

parameters

Buy Me A CoffeeDigitalOcean Referral Badge
Loading...
Edward Beazer

Edward Beazer - I just like to build shit. Sometimes I get stuck for hours, even days while trying to figure out how to solve an issue or implement a new feature. Hope my tips and tutorials can save you some time.

DigitalOcean Referral Badge