OnComponentBeginOverlap not firing event

I’m testing on two objects that both use the UFO static mesh from the flight starter template. On both Static Meshes I’ve set the Generate Overlap Events, set CollisionPresets to OverlapAll, and set Simulation Generates Hit Events.

In my constructor I have:

static ConstructorHelpers::FObjectFinder P2MeshClass(TEXT("StaticMesh'/Game/Flying/Meshes/UFO.UFO'"));
PlaneMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("PlaneMesh0"));
PlaneMesh->SetStaticMesh(P2MeshClass.Object);

Planemesh->OnComponentBeginOverlap.AddDynamic(this, &ASpaceGamePawn::OverlapBegin)

I also have:

PlaneMesh->OnComponentHit.AddDynamic(this, &ASpaceGamePawn::OnHit);

and

this->OnActorBeginOverlap.AddDynamic(this, &ASpaceGamePawn::ActorOverlapBegin);

And later on, here is OverlapBegin

void ASpaceGamePawn::OverlapBegin(class AActor* Other, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& Hit)
{
	//Super::NotifyHit(MyComp, Other, OtherComp, bSelfMoved, HitLocation, HitNormal, NormalImpulse, Hit);
	GEngine->AddOnScreenDebugMessage(-1, 50.f, FColor::Blue, TEXT("YAAARRRR"));

	// Pass to Dynamics Component
	UActorComponent* OtherSDCActorComp = Other->FindComponentByClass(USpaceDynamicsComponent::StaticClass());
	USpaceDynamicsComponent* OtherSDC = Cast<USpaceDynamicsComponent>(OtherSDCActorComp);
	if (!OtherSDC)
		return;

	SDC->NotifyHit(OtherSDC, Hit.ImpactPoint, Hit.ImpactNormal);
}

NotifyHit does work when the two things are set to BlockAll, and NotifyActorBeginOverlap works when they’re set to overlap all, but why don’t the components work?

Unfortunately NotifyActorBeginOverlap doesn’t work for me since it doesn’t have the HitLocation and HitNormal vectors or an FHitResult.

Suggestion… Use the insert code, easier to read… (I just learned about this not too long ago!)

The code you have is incomplete. Can you show how you set up ASpaceGamePawn::OverlapBegin? You don’t have a type for your CreateDefaultSubobject call, what is it supposed to be? I don’t see a collision primitive, are you intending to do a mesh to mesh collision?

I added the OverlapBegin function to my original post.

CreateDefaultSubobject did have a template type, for some reason it got erased when copy pasting. I am using the static meshe’s built in simplified collision mesh, which shows up when I view the static meshe in the details viewer (and also must exist because block all works and I have not assigned any other collision components to the actors).