Download

Two ISMCs with near-identical constructors, one has collision, the other doesn't

Greetings all,

I am wracking my brain trying to figure this out and coming up short. I have two Instanced Static Mesh Components. Both are attached to pawns, but the first is just a regular ISMC. The second is a custom class. Both use effectively the same constructor, as seen below:

1st ISMC (the one that has working multi-body overlaps)

ShipOarInstances = CreateDefaultSubobject<UInstancedStaticMeshComponent>(TEXT("ShipOarInstances"));
ShipOarInstances->SetupAttachment(RootComponent);
ShipOarInstances->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
ShipOarInstances->SetGenerateOverlapEvents(true);
ShipOarInstances->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
ShipOarInstances->SetCollisionResponseToAllChannels(ECR_Overlap);
ShipOarInstances->bMultiBodyOverlap = true;
ShipOarInstances->NumCustomDataFloats = NumDataFloats;

2nd ISMC (the one that doesn’t have working multi-body overlaps)

TroopInstances = CreateDefaultSubobject<UWDSUnitTroopInstances>(TEXT("TroopInstances"));
TroopInstances->SetupAttachment(RootComponent);
TroopInstances->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
TroopInstances->SetAbsolute(true, true, true);
TroopInstances->SetGenerateOverlapEvents(true);
TroopInstances->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
TroopInstances->SetCollisionResponseToAllChannels(ECR_Block);
TroopInstances->bMultiBodyOverlap = true;

The following delegate is set up on both:

OnComponentBeginOverlap.AddDynamic(this, &UWDSUnitTroopInstances::GetSeparationComponent);

The delegate only works on the first. I have been over this for a couple nights now, going through every physics setting and collision setting I can imagine (including in derived blueprints looking for accidental checkmarks where they shouldn’t be), and I cannot for the life of me get the second to work. I have tried creating new blueprint instances, thinking maybe it was a blueprint corruption issue, tried different meshes, tried different levels, but nothing makes a difference. I am quite unsure of where to take it from here. Here’s a pic illustrating the issue (the pawn collision cube is unrelated).

Any help would be greatly appreciated!