So how do i make my Animation BP inherit from character actor?

I am relatively new to ue4 and I just started to cast variables between BP but I am having trouble when trying to change variable in my Anim BP from my Character BP. This is the error message that I get. How do fix this?

Hi there! Animation BP And its PawnOwner (Character BP) - are two different classes, so you cant Cast Animation BP to Character BP and Character BP to Animation BP. Usually, people configure data flow in the next manner:

  • Add some variable in your Character BP
  • If added variable can influence on Animation BP then add the same variable in Animation BP and in Event Blueprint Update Animation set the value for it from the one from Character BP
  • Use variable of Animation BP in transition conditions, Blend Spaces, etc

As you can see - in this case, logic flows in one direction, so you dont get logic cycles and other difficulties.

You need to get the animation instance of the character you are on, the animation instance is owned by the skeletal mesh, named only mesh in the character

Cast to ThirdPerson_AnimBP is to be replaced with your animation bp class

casting self to anything is normally not necessary because it is already the most specific version of itself and it can be used as all its less specific versions.

e.g.
If you are on BP_MyCharacter a blueprint inheriting from Character you can use self as

BP_MyCharacter,
Character,
Pawn,
Actor

without needing to cast

Thank you, I’ve been searching for this for a while now. Didn’t expect the solution to be so simple.

happy to help, if it works it would be greatly appreciated if you could accept the answer

Thank you livesaver.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.