# Animation Blueprint - GetPlayerController & TryGetPawnOwner returns None

**URL:** <https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4-27, Blueprint\
**Created:** [May 16, 2022, 3:55pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555 "2022-05-16T15:55:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [May 16, 2022, 3:55pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/1 "2022-05-16T15:55:42Z")

</div>

Hi,

I cannot get the character instance in the animation blueprint

I have setup a debug case :

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/c/bdc942c4c797ba80d34b720fd88c7506a5dba6b2.png)

and as one can see, no data are returned :

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/a/3ea80d0507d4bf49be01f1c26002d093793de78a.png)

am I missing something ?

everything appears to be linked together

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/0/570ea2f90efd9119e425fcf50c67e53d08442821.png)

thanks for your help

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [May 18, 2022, 7:27am UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/2 "2022-05-18T07:27:26Z")

</div>

anyone ?

---

<div class="post-metadata">

**Author:** ![Fuchsnerichen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fuchsnerichen/32/486904_2.png) [@Fuchsnerichen](https://forums.unrealengine.com/u/Fuchsnerichen)\
**Post date:** [May 18, 2022, 1:06pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/3 "2022-05-18T13:06:09Z")

</div>

Whats the point of getting the player character within the animation blueprint?  
You could set the pawn (eg in your player controller) and use it within the animBP

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [May 18, 2022, 3:44pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/4 "2022-05-18T15:44:36Z")

</div>

based on examples/tutorials, it should be set  
why would’n it be…by experience getplayercontroller always returns something  
also trygetpawnowner is created by default in the animbp

the whole thing smells

anyway I’ll try create another simpler animbp/character to see if I can reproduce the issue

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [May 18, 2022, 4:13pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/5 "2022-05-18T16:13:50Z")

</div>

Hi, if `TryGetPawnOwner` returns nullptr, then that means that the owner of this anim bp (if there is any) is not a pawn (you could try `GetOwningActor` to see whether it has any owner at all, `TryGetPawnOwner` does the same as `GetOwningActor` plus it casts that to pawn).

Generally it should work if you just create a pawn (or character), add a skeletal mesh to it and then add an anim bp to that skeletal mesh.

* * *

> why would’n it be…by experience getplayercontroller always returns something

`GetPlayerCharacter` is the same as using `GetPlayerController` → `GetControlledPawn` → Cast that to `Character`. So you could do that manually in blueprint and then see where it fails.

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [May 20, 2022, 4:42pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/6 "2022-05-20T16:42:59Z")

</div>

thx I’ll check that out

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [May 24, 2022, 7:17pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/7 "2022-05-24T19:17:59Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/1/951f7e8a4a1827e7936b2b4f55c1196405f6d517.png)

so if I close the anim bp editor and run the game, the anim bp is not called anymore

how come my anim bp is not executed during gameplay ?

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [May 24, 2022, 7:27pm UTC](https://forums.unrealengine.com/t/animation-blueprint-getplayercontroller-trygetpawnowner-returns-none/558555/8 "2022-05-24T19:27:16Z")

</div>

ok I figured I was adding a skeletal mesh inside my character actor instead of setting a skeletal mesh on the inherited mesh component  
stupid of me 🙂
