Is there any way to have my subcomponents not affected by the collision settings of the parent?

Apparently “OnOverlapBegin” is a function that the engine uses for something else. Renaming the delegate to something else solved my problem.

Apparently problem is half solved, now it doesnt work at all, the function is declared as a UFUNCTION(), but cannot figure out why could be causing this issue, in blueprints, as said before, it does work perfectly.

Moving the binding of the function from the constructor to begin play solved the issue completely.

I have the following setup:

193432-1.png

Where the capsule component is a “Pawn” object type and the “EdgeCollider” is another object type with completely different collision profiles. Here the Capsule one:

And here the EdgeCollider one:

Thing is that my Capsule component trigger this overlap event while it shouldnt. In blueprints it doesnt:

// Collider for ledges -> This is on the constructor
	LedgeCollider = CreateDefaultSubobject<USphereComponent>(TEXT("LedgeCollider"));
	LedgeCollider->SetupAttachment(RootComponent);
	LedgeCollider->RelativeLocation = FVector(45.f, 0.f, 33.f);
	LedgeCollider->SetSphereRadius(10.f);
	LedgeCollider->SetCollisionProfileName(FName("PawnLedgeColli"));
	LedgeCollider->CanCharacterStepUpOn = ECB_No;
	LedgeCollider->OnComponentBeginOverlap.AddDynamic(this, &ASprunchCharacter::OnOverlapBegin);

//The method itself
void ASprunchCharacter::OnOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	ClimbMarker = Cast<ASprunchClimbMarker>(OtherActor);
	if (GetCharacterMovement()->MovementMode == MOVE_Falling && InputMode == EInputMode::E_Default && ClimbMarker) {
		InputMode = getHangingInputMode(OtherActor);
		// if in mid air: try climbing to hit marker
		SetNewClimbMarker(300.f);
		// Changing movement mode, we use flying because of convenience
		SprunchCharacterMovement->SetMovementMode(EMovementMode::MOVE_Flying);
		SprunchCharacterMovement->StopMovementImmediately();
	}
}