Can someone please explain onComponentHit?

I’ve recently noticed that onComponentHit sometimes seem to behave strangely. In particular, if i add an additional collisionbody like a sphere on my character, and hook up either a onComponentHit or onBeginOverlap, none of those events are fired for the Sphere. I’ve made sure to set collisionchannels to Block all for both the mesh i collide with and the default CollisionCapsule + the new CollisionSphere. So the strange thing is that the default CollisionCapsule prints out fine, but not the added Sphere. I’ve also tried to disable “Auto weld” setting on the Sphere to make sure the Sphere doesn’t inherit some values from there.

I wonder if something changed in some of the recent versions? I tried this in UE4.10 and there it seems to be the same, but didn’t test this with UE4.9 or previous versions.

Hope someone can shed some light on this matter. Thanks.

Hello,

Are you using a class based on Character? If so, the reason that your events are not working is because the Character class only supports the default capsule collision. This is because the character movement component is written specifically for capsule collision. If you’d like to use additional collision types, look into using a pawn instead of a character. This will allow you to have a lot more flexibility with your class, and ensure that you can use multiple collisions if need be.

Have a great day

Jup, that explained it… thanks :slight_smile: