I can see how your suggestion should work, but I couldn’t get it to work, and really I don’t want enemies of my class ignoring all objects derived from “Pawn”, just ignoring objects of their own class.
Thanks for the reply, though, I do appreciate it.
I stumbled onto something that is working for me. I am using a class a member function called “OnHit” to determine how to react to various classes on collison.
TumblrMeshComponent->OnComponentHit.AddDynamic(this, &ATumblr::OnHit);
To get objects of my class “Tumblr” to ignore other objects of the same class…
void ATumblr::OnHit(AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
if ((OtherActor != NULL) && OtherActor->IsA(ATumblr::StaticClass()))
{
this->MoveIgnoreActorAdd(OtherActor);
}...
This seems to work, though I have encountered a couple cases where it seems to ignore objects that should be destroying it…
Any other ideas?
EDIT:
The missed collisions I was seeing were due to another bug in my game. This method works perfectly.