Get Overlap position and normal

Hey, I need to get the position that the overlap occurred for my capsule component along with the impact normal. The SweepResult for my OnOverlap() always returns the default result, probably due to bFromSweep being false. How do I get this information? Searching, it seems like Overlap is not capable of this, however I do not want my capsule to block collision. This seems like something that would come up often, so I must be missing something. Any Advice?

If you have an overlap, and wish to know the location of the overlap, you can run a sweep at that time to find the location of the overlap.

Using World(), you can sweep your component, and just sweep it a small non-zero distance. You should then be able to find the actor that you overlapped in the hit results, and be able to get the impact point there.

TArray<FHitResult> OutHits;
FComponentQueryParams Params;
Params.AddIgnoredActor(this);
World->ComponentSweepMulti(OutHits, BladeCollisionComponent, BladeCollisionComponent->GetComponentLocation() + FVector(-.1f), BladeCollisionComponent->GetComponentLocation() + FVector(0.1f), BladeCollisionComponent->GetComponentRotation(), Params);

FVector Position = GetActorLocation();
for(const FHitResult& Result : OutHits)
{
   if(Result.GetActor() == OtherActor)
   {
      Position = Result.ImpactPoint;
    }
}
1 Like