You can set each box to trigger collisions or to trigger overlaps with their collision profiles. When you spawn the hitbox components you can set their collision rules like the following:
For collision and physics:
//activating physics and collision for this component
HitboxComp->bShouldUpdatePhysicsVolume = true;
//setting collision response type
HitboxComp->BodyInstance.SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
//setting a collision profile; each profile has default behaviors defined per channel
HitboxComp->SetCollisionProfileName(UCollisionProfile::BlockAllDynamic_ProfileName);
//you can override individual channel responses within your existing profile, or set specific responses for every
//available channel in your game
//this strips any preset collision responses and sets the component to ignore all
HitboxComp->BodyInstance.SetResponseToAllChannels(ECR_Ignore);
//you can set individual response types for the channels you want; ECR_Overlap, ECR_Block, or ECR_Ignore
//in this case all are set to block (collide)
HitboxComp->BodyInstance.SetResponseToChannel(ECC_WorldStatic, ECR_Block);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_WorldDynamic, ECR_Block);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_Pawn, ECR_Block);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_PhysicsBody, ECR_Block);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_Vehicle, ECR_Block);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_Destructible, ECR_Block);
For overlap events:
HitboxComp->bGenerateOverlapEvents = true;
HitboxComp->BodyInstance.SetCollisionEnabled(ECollisionEnabled::QueryOnly);
//define the collision profile for this component
HitboxComp->SetCollisionProfileName(UCollisionProfile::BlockAllDynamic_ProfileName);
//set response to all existing channels
HitboxComp->BodyInstance.SetResponseToAllChannels(ECR_Ignore);
//set response to individual channels; not all channels have to have the same response
HitboxComp->BodyInstance.SetResponseToChannel(ECC_WorldStatic, ECR_Ignore);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_Pawn, ECR_Overlap);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_Vehicle, ECR_Overlap);
HitboxComp->BodyInstance.SetResponseToChannel(ECC_Destructible, ECR_Overlap);
You can also set these values in the editor within the details panel of your object, under Collision and the Collision Presets panel.
In your case, I would define a custom collision profile for your overlap hitboxes and one for your physics-enabled hitbox and assign them as needed.
For more details see:
Default collision channels and response types are defined in ‘Runtime/Engine/Classes/Engine/EngineTypes.h’; see lines 553 and 743.
UCollisionProfiles are defined in ‘Runtime/Engine/Classes/Engine/CollisionProfile.h’