Collision affects only the root component

I have realized that collision handlers are called always with Actor’s Root Component as the ‘HitComponent’ parameter (first parameter).

It is happening even if I have some other child components (with simple collisions) on that Actor and if the test ensures that those components are affected by the collision, not the Root Component.

Am I right?
And if so: are there some options maybe to change this behaviour?

what is the root component? for example the capsule on a character will get hit before the mesh since its larger.

keep an eye out for invisible colliding components

Hello. Root Component is of UStaticMeshComponent type as are the child components.

hmm we may need to see some code

Code, but which one? Because this procject is quite large…

Maybe it will be easier to just answer my initial question: am I right that ‘HitComponent’ value in collision handler is always set to Actor’s Root Component?

Plus I can send collision handler’s function header here:

void ComponentHaveBeenHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult& HitResult)

…so now it should be clear what the ‘HitComponent’ is.

no it should return the actual hit component, including child components which means something is likely wrong with your trace/hit collision or the root component has an invisible component that overlaps the child components

Ok, this is useful information. I have checked for invisible components with ‘show COLLISION’ console command and I see nothing wrong.

About configuration: I have noticed that my components all have ‘Auto Weld’ option enabled, but when I switch this option off they just stop to physically collide with the sorroundings despite of their ‘Collision Presets’ setting (which is ‘BlockAllDynamic’).