Animation Blueprint - GetPlayerController & TryGetPawnOwner returns None

Hi,

I cannot get the character instance in the animation blueprint

I have setup a debug case :

and as one can see, no data are returned :

image

am I missing something ?

everything appears to be linked together

thanks for your help

1 Like

anyone ?

1 Like

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

1 Like

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

1 Like

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 GetPlayerControllerGetControlledPawn → Cast that to Character. So you could do that manually in blueprint and then see where it fails.

1 Like

thx I’ll check that out

1 Like

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 ?

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 :slight_smile: