Custom Collision Channel refuses to detect overlay

Hey. I’m trying to use the custom collision channel ECC_GameTraceChannel1 for overlapping.

Here is my volume class:

#include "MyGame.h"
#include "TeamPushingVolume.h"

ATeamPushingVolume::ATeamPushingVolume(const class FObjectInitializer& OI)
    : Super(OI)
{
    this->bPhysicsOnContact = true;

    GetBrushComponent()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
    GetBrushComponent()->SetCollisionObjectType(ECollisionChannel::ECC_GameTraceChannel1);
    GetBrushComponent()->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);

    // Uncommenting this line, then it enters ActorEntering/LeavingVolume
    //GetBrushComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Overlap);

    GetBrushComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_GameTraceChannel1, ECollisionResponse::ECR_Overlap);

}

/* This doesn't work either
void ATeamPushingVolume::BeginPlay()
{
    Super::BeginPlay();

    GetBrushComponent()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
    GetBrushComponent()->SetCollisionObjectType(ECollisionChannel::ECC_GameTraceChannel1);
    GetBrushComponent()->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore);

    //GetBrushComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Overlap);
    GetBrushComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_GameTraceChannel1, ECollisionResponse::ECR_Overlap);
}
*/

void ATeamPushingVolume::ActorEnteredVolume(AActor* Other)
{
    if (auto Pawn = Cast<AMyPawn>(Other))
    {
        LOG_BLUE(TEXT("player entered"));
    }
}

void ATeamPushingVolume::ActorLeavingVolume(AActor* Other)
{
    if (auto Pawn = Cast<AMyPawn>(Other))
    {
        LOG_BLUE(TEXT("player left"));
    }
}

Header file

#pragma once

#include "GameFramework/PhysicsVolume.h"
#include "TeamPushingVolume.generated.h"

UCLASS()
class SUPRABALL_API ATeamPushingVolume : public APhysicsVolume
{
	GENERATED_BODY()
	
public:
    ATeamPushingVolume(const class FObjectInitializer& OI);

public:
    virtual void ActorEnteredVolume(AActor* Other) override;
    virtual void ActorLeavingVolume(AActor* Other) override;

    //virtual void BeginPlay() override;
};

And the entries in the very bottom of pawn constructor

    GetCapsuleComponent()->SetCollisionObjectType(ECollisionChannel::ECC_Pawn);
    GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);

    GetCapsuleComponent()->SetCollisionResponseToChannel(ECollisionChannel::ECC_GameTraceChannel1, ECollisionResponse::ECR_Query);

I also tried setting the CapsuleComponent collision response in BeginPlay of the Pawn… To no avail.

My Default.ini has the following entry

+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1, Name=TeamAlpha)

Now… What the devil am I missing here? I can’t find a lot of topics about it except that people had trouble getting it to work as well.
Every time I changed something and recompiled I deleted the TeamPushingVolume and added a new one (to get it to initialize from anew).

Is it bugged or is something wrong with my code?

Edit: I also read a post where the person stated the with blueprints it works, but with code it doesn’t…? Sounds a bit buggy.

Edit2:
Also tried adding this line to editor
+EditProfiles=(Name=“Pawn”,CustomResponses=((Channel=TeamAlpha, Response=ECR_Block))

Doesn’t work.

Am I simply understanding it wrong?
The way I understand collision channels is this:

Every actor (component) in the world can subscribe to a channel (SetCollisionResponseToChannel).
So I can set up my own volume, set its CollisionType to be CustomChannel1, enable collision (QueryAndPhysics) and …

Thinking about this just solved it I believe.
New hypothesis:
Every component (primitive) can have a collision object type set. This means that this component when moving through the world triggers the responses of other components that listen to this channel (SetCollisionResponseToChannel).

Since a pawn usually has its component set to channel ECC_Pawn, I can not detect a channel X in my volume when the pawn moves through, because the pawn is not of Collision Object Type X.

This would mean, I’d have to create an extra component for my pawn that has its collision object type set to my custom channel. Then I can listen to overlays in my volume.

Is this correct???

Good reads:

Though I still haven’t understood exactly how components can be used as colliders and how parenting and childing works there.
I didn’t get a component to work.

In pawn constructor:

this->TeamCollisionComponent = OI.CreateDefaultSubobject<UCapsuleComponent>(this, TEXT("TeamCollisionComponent"));
    this->TeamCollisionComponent->InitCapsuleSize(200, 288.0f);
    this->TeamCollisionComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
    this->TeamCollisionComponent->SetCollisionObjectType(COLLISION_TEAMALPHA);
    this->TeamCollisionComponent->SetCollisionResponseToChannel(COLLISION_TEAMALPHA, ECR_Block);
    this->TeamCollisionComponent->CanCharacterStepUpOn = ECB_No;
    this->TeamCollisionComponent->bShouldUpdatePhysicsVolume = true;
    this->TeamCollisionComponent->SetSimulatePhysics(true);
    this->TeamCollisionComponent->AttachTo(GetCapsuleComponent());

Didn’t work though volume was set to block on COLLISION_TEAMALPHA and is itself a COLLISION_TEAMALPHA object.

It is complicated indeed. But I’ll mark this as solved for now : ).