Get actor or character from animation EventGraph

Hello!

I’m starting to grasp the main framework of UE, but am a little stuck here.

I am trying to access the actor or character from an animation’s event graph so I can use it’s velocity, but nothing I try seems to work.

GetOwnerActor and TryGetPawnOwner both fail the IsValid (is that how you use it?) and return a zero vector if I try to get their velocity.

Below is the character hierarchy:

2132-blueprint2.png

How do I do this?
Thanks.

Inside the Persona editor, Get Owning Actor will always fail because it doesn’t have one! That is by design. In the editor, you are expected to adjust the variables directly in the Edit Preview tab (bottom left). In the game it will have an owner, and your variables should be set by interrogating it.

For some reason, when I came home today, the blueprint wouldn’t output anything I gave it.

To anyone with the the same or similar problem, make sure you have the Anim Blueprint set correctly in the skeletal mesh component of your character.

You can use Get Owning Actor in any BluePrint event graph, inside Persona EventGraph use GetPlayerCharacter, then cast to your class, that works for me!

38760-image.jpg

My experience is that GetActorOwner does not return the character blueprint reference at any time. Neither the edit mode nor the run-time mode.

I did another way to go around it. Here is the steps:

a. Add a variable called TheActor in my animation blueprint and set its type to be a reference to the character blueprint

b. On the character’s event graph, do the following:

  • Drag in the mesh node
  • From the mesh node, Get Animation Instance
  • Cast the animation instance to be the reference to your animation blueprint
  • Set TheActor of the cast animation instance to be self

Hope it helps you to solve your problem.

How to get self actor of current animation processing?