SphereOverlapActors doesn't detect Pawn (but does detect Actor)

I have a CPP code for detecting when an Actor hit something (using a sockat location).
this code detects overlaps on Characters (BP subclass of a class that subclasses ACharacter), but when I try hit on another enemy that is a BP that inherits from a Pawn it doesn’t detect.

TArray<TEnumAsByte<EObjectTypeQuery>> TraceObjectTypes;
	TraceObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn));

	UClass* SeekClass = AActor::StaticClass();

	TArray<AActor*> ActorsToIgnore;
	ActorsToIgnore.Init(Owner, 1);

	TArray<AActor*> HitActors;
	

	UKismetSystemLibrary::SphereOverlapActors(Owner, SocketLocation, HitRadius, TraceObjectTypes, SeekClass, ActorsToIgnore, HitActors);

Watched and read about it and I’ve tried all kinds of capsule/box collision components with different settings in the collision and the Cuve mesh…
and yet I don’t know why it doesn’t detect the overlap with the Pawn.

Pawn BP that doesn’t trigger sphere:

Character the does trigger sphere

thanks for the help

add

TraceObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_WorldDynamic));

after

TraceObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn));

In your current code you are only testing for pawns

thanks, but still nothing.

  • I’m trying to hit a APawn subclass (or the collision capsule/box that is inside it).
    with a BP that inherits from a ACharacter it detects the overlap.

never mind, I’m made a stupid mistake. the sphere misses the collision box by a fraction…
notice it only after drawing a sphere:

DrawDebugSphere(GetWorld(), SocketLocation, HitRadius, 12, FColor::Red, false, 1.0f);

so silly.
kids, always draw debug.