Damaging an Actor from a custom NPC class in Player class when hit by a line trace
But we cannot just assume that the actor is a child of ANPC class so that doesn't work.
If you know how to help me, then please post an answer to my question.
Hey, it looks like you are looking for casts.
You have to do something like the following:
Cast "converts" the AActor to your ActorType and you can call your functions on it. If the cast fails it returns a nullptr, so you have to do the nullcheck before using it.
Follow this question
Once you sign in you will be able to subscribe for any updates here