Animation blue print - try get pawn owner

Dear unreal experts

I am trying to get an animation blue print up and running, and I think I have the basics, but its not working.

I am trying to set a “speed” variable in the event graph to drive the animation graph.

But appears as if the “try get pawn owner” returns 0 all the time. So I can set the speed variable to drive the anim graph… I am confused !

I attach a screen shot of the event graph, any ideas ??

If “try get pawn owner” returns 0, then that tells me your character blueprint may not be set to use that animation blueprint.
f25bc44dfc3f71f4530a1262bc9449654ffab7eb.jpeg

I am pretty sure I have set the character to use the correct anim blue print. Screen shot attached so people can validate for me.

Now that’s weird I just opened the ed up to grab that screenshot… and it works perfectly ! maybe I didn’t compile the character before.

Dunno, just chalk that up to experience I guess, now if I can work out how to import an animation without it crashing… I’d be very happy.

I want to bump up this topic. I’m having the same issue. I’ve made sure over and over again that the proper anim blueprint is selected, and that the character is compiled.

My issue is that the ‘Try get pawn owner’ returns ‘None’ on the client and the valid pawn on the server… which is completely opposite of what should be expected.

having the same problem. I just asked it on AnswerHub because I see no real reason it isn’t doing that.

I have the same problem. The wierd thing is, when I try and print the anim instance from the pawn blueprint, it prints it out just fine. And also the animations work corectly, at least the part that doesn’t relay on data from owner pawn. That pawn is actualy a gun, which is spawned from my character (which works perfectly) and is then attached to one of the sockets. But I don’t think the problem is that the gun is spawned, because even if I manualy place it in the level, it still always returns None as a “Owner Pawn”.

Could it be, that animation blueprints only work with character class blueprints? Because I tryed a couple different skeletal meshes with their own animation blueprints, and none of them worked as a pawn. But when I put them in the character blueprint, they work just fine.

I had the same issue and figured out my problem:
My blendspace and animation bp were set to use a different copy of the mesh than what I had set for my character.

I know this is an old post, TryGetPawnOwner will ALWAYS return False in debug mode when the game is not running. If you are not seeing your animations working in the AnimBlueprint preview window, go back to your Anim Graph and make sure your State Machine (probably called Locomotion) is attached to the “Final Animation Pose”

I had the same issue recently, and discovered the problem in my case was the AnimBP replicating to the server while the actor (would be the same issue with a pawn) driving it isn’t necessarily replicating or relevant to the server. To fix this just check ‘Replicates’ in the Class Defaults so your animations line up server and client side.

instead of using pawn owner use

I was just running into very similar issues and was able to sort things out thanks to this post and a few other Google searches. Some useful findings that might help others are:

  • My character was using the wrong Skeletal Mesh - I had started with the “Third Person Tutorial” so my character was initially using the sk mesh named “SK_Mannequin” located in “Mannequin/Character/Mesh”. I pulled in the “AnimStarterPack” and created a new AnimBP copied from the “UE4ASP_Hero_TPP_BP” but failed to change my character’s mesh to the similarly named “SK_Mannequin” located instead inside of “AnimStarterPack/UE4_Mannequin/Mesh”.
  • Blueprints let you pick the target for debugging but the window must be wide enough to see “Debug Filter” dropdown - I kept seeing that the BP flow was indicating that the pawn from “Try Get Pawn Owner” was not valid even though all of my connections seemed fine. I added some “Print Text” blocks to print the state of Valid and noticed that while running the game I’d see alternating “Pawn is valid” and “Pawn is not valid” messages. Turns out that the BP editor window was not wide enough to show the “Debug Filter” drop down that lets you change the target to attach to. Widening the window let me retarget to the “(spawned)” version of the AnimBP and sure enough the flow started indicating a valid pawn owner.

I spent way too long on this, but rent_treznor’s post was the most helpful. In my case it was getting stuck in a state I hadn’t developed yet, which had no output pose.