NotifyHit on a component mesh... (non root)

I’m on 4.22.3 and I’ve been playing around with the C++ Flying project, and I wanted to use the NotifyHit function that already comes with the class. It works great when the root component is a mesh and obviously has collision.

The problem arises is when you no longer make the mesh the root, but you add a scene component as root then attach the (already working and colliding notify hit generating) mesh.

Everything still works exactly the same, except there are no longer any notify hit calls happening. It appears that Notifyhit only works on the root component?

I thought I was onto something with OnComponentBeginOverlap with DynamicAdd, but this is a different signature than NotifyHit.

Any ideas or suggestions on this?

I also tried setting these but to no avail:


    //PlaneMesh->SetSimulatePhysics(true);
    //PlaneMesh->SetEnableGravity(false);
    //PlaneMesh->SetNotifyRigidBodyCollision(true);
    //PlaneMesh->SetGenerateOverlapEvents(true);
    //PlaneMesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
    //PlaneMesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_MAX);
    //PlaneMesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Overlap);
    //PlaneMesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block);
    //PlaneMesh->bUseDefaultCollision = true;

Well I posted on the forum too hastily, after more searching I found and older post with the problem and a solution to those looking to get sub component sweep detection working…

https://forums.unrealengine.com/deve…6-no-collision

In short, movement/sweep collision is only done on the root component.

(unless you enable physics and switch to physics based movement, then all rigid bodies are added together)