How to get the C++ component's father character?

I created a C++ actor component in a blueprint character.

how can I get the character’s pointer in my component class?



AActor * GetOwner() const


[quote=“, post:2, topic:150616”]



AActor * GetOwner() const


But this code gets the actor, not the character…

and I also tried to cast the actor to character, but something might go wrong…

If something goes wrong with the cast, then the owner is not a character.

Thank you ~

Owner->GetComponentsByTag(USceneComponent::StaticClass(), ComponentsTag);