How can I have characters ignore a ragdoll?

I’m using the AI MoveTo with navigation and it works great. I can easily make it ignore certain meshes by setting their collision responses to Overlap for Pawn and Vehicle. The problem is that when I kill a character, I ragdoll them, and at that point I can’t get the character to ignore them when moving. It tries to run through the bodies and gets stuck on them.

Here are the collision profiles for the live character and the dead character. From everything I can see, they should ignore each other, but they don’t.


To ignore a specific actor can use MoveActorIgnoreAdd:

APawn::MoveIgnoreActorAdd | Unreal Engine Documentation

Thank you, that looks perfect! Now to get it working…
What am I missing? I tried the shotgun approach here and threw it at everything, but still doesn’t work.

More shotgunning:

  TArray<AActor*> actors;
  UGameplayStatics::GetAllActorsOfClass(GetWorld(), ALmdaUnitCharacter::StaticClass(), actors);

  for (AActor* actor : actors) {
    Cast<APawn>(actor)->MoveIgnoreActorAdd(this);
    MoveIgnoreActorAdd(actor);
  }

He still only walks up to the body and then stops:

image

Hmm not sure. Might have something to do with it being AI and not a player.

We use MoveActorIgnoreAdd() extensively on player characters but I’ve not used it with bots.

I’ll keep exploring, thanks!