After some experiments, I noticed that the problem arose from blueprint deriving class not automatically updating itself with the C++ base class. So I had to delete the existing blueprint class, and recreate it based on the latest C++ base class. Not sure if this is a bug or expected behavior.
engine version 4.10.4
The question was initially titled root component collision ignored
Dear experts,
In C++ I created a base actor, added a box component, and set it to root
BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("RootComponent"));
RootComponent = BoxComponent;
BoxComponent->InitBoxExtent(FVector(100.0f, 100.0f, 100.0f));
BoxComponent->SetSimulatePhysics(true);
BoxComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
BoxComponent->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block);
In Blueprint, I derived another actor from the base actor, added a cube static mesh component — which is the child component of the box and much smaller than the box — and chose the collision preset OverlapOnlyPawn.
I expected the root component collision setting would be honored, but contrarily the player is free to overlap with and walk through the derived actor.
Is this behavior expected? Why is the root collision setting ignored?
I haven’t found an explanation from the documentation yet, but in case I missed anything important please enlighten me. Thank you.