Skip to content

How to Connect Animation Blueprint to Pawn – Unreal Engine 4

Short tutorial of how you can connect to Animation Blueprint you just added to Skeletal Mesh thats inside Pawn or Actor.

Method 1

This method is most common, it makes Animation Blueprint completely independent which you can find out to be useful especially if Skeletal Mesh is meant to swap Animation Blueprints. Also if your Character is C++ Class.

This is how you can create Animation Blueprints. Select the Skeleton of Skeletal Mesh and right click on it.

create animation blueprint ue4

In Event Graph of Animation Blueprint you’ll find out this. Event Blueprint Update Animation is the Tick of Animation Blueprint. Try Get Pawn Owner is the one which gets the Pawn or Character where this Animation Blueprint is playing.

try get pawn owner ue4

The first thing you want to do is this. Cast to Character Blueprint.

try get pawn owner cast to thirdpersoncharacter ue4

Then you can put it into variable.

Use Promote to variable to set it.

promote to variable animation blueprint ue4

Now you can do stuff with it like getting the Camera location.

animation blueprint follor camera world location

You need to use Is Valid Macro for components. Otherwise you’ll get errors at the start of the game because Pawn and Follow Camera is nullpointer at the start, Animation spawns faster then Character.

is valid animation blueprint

Method 2

In this method we add Animation Blueprint reference variable into Character Blueprint. This is good if Skeletal Mesh is not swapping Animation Blueprints and you wan’t to do more stuff in Character Blueprint.

Also you need this if Character Blueprint is using Animation Blueprint Event Dispatchers.

This method allows editing the Animation Blueprint even in realtime.

Right click anywhere and type this. Select Get a reference to self.

get a reference to self animation blueprint

Now promote it to variable.

animation blueprint promote to variable self reference

Select the variable and Copy.

Jump to Character Blueprint and Paste.

Then right click it and select Create variable…

create animation blueprint reference in character blueprint

Hit compile and…

Now you have the variable in Character Blueprint.

In Animation Blueprint delete the previous variable you pulled out from Self.

Pull out from ThirdPersonCharacter Cast and type the name of Animation Blueprint variable you created in Character Blueprint.

Now the Animation Blueprint updates the variable in Character Blueprint.

If the Skeletal Mesh is not in Pawn but instead in Actor you can replace Try Get Pawn Owner with Get Owning Actor and you’ll get the owning actor.

get owning actor animation blueprint

Method 3

This method is most unpopular. You can use Get Anim Instance and Cast to connecting to Animation Blueprint.

get anim instance character blueprint

The Winner Is

Only a fool would question the Method 2’s supremacy.

cat supreme
Gandalf Approves

Goodbye.

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
Level Paradox
0
Would love your thoughts, please comment.x
()
x