OnComponentBeginOverlap not trigerring in neither c++ nor blueprints

Hi UE4 Team ,

In my level blueprint I am spawning 2 Characters (one is player and other is enemy) . But only hit event is getting triggered only on capsule component.

No overlap events are working on mesh at all.

Heres the C++ Implementation.

Header

Cpp

When C++ approach didn’t work I deleted all overlap codes from C++ character class and tried to do it at blueprint level…Here’s the setup along with mesh collision presets

Please help me out …

Why are you trying to set the mesh to overlap? I believe, by default, character capsules are set to block each other, so the character meshes won’t likely ever overlap unless they are noticeably bigger.

Do you need the hit event from the capsule for something specific or would setting the capsule profile to “overlap” for other “pawn” objects be a reasonable solution?

Thanks for the reply I will try your solution and remind you whether it worked or not…

Once again thanks.

Your above solution only solved my half problem.

Actually as I already mentioned I have 2 characters (one is player and other is controlled by AI) , by setting profile of other pawn’s capsule as overlap does generated the hit event for my player , but I also want hit event to be generated for AI controlled character.

If I set the collision preset of player’s capsule as overlap the character falls below the floor mesh.

Any further solution will be a great help.

You don’t want to change the preset. If you change the preset to overlap, the actor will overlap everything. You only want to change the “pawn” object response to overlap on both.

Reference the picture below (ignore the yellow mark). Next to “pawn”, you want to set both to “overlap”. By default, the pawn preset blocks other pawns, I believe. You also want to set “Generate Overlap Events” on both to true. Just set one or both back to “pawn” and make the change and everything should be fine.

https://docs.unrealengine.com/latest/images/Engine/Physics/Collision/Overview/COL_collideNoEvent_Box.png

No problem. The collision system is really useful, but can be confusing, sometimes. One more thing that might be helpful later: you can make custom collision objects and presets, similar to the ones in UE.

Oh, also, don’t forget to mark this as the answer to you question so that the issue is marked as “answered”. It’s also good for people who have the same problem.

Thanks Bro , you really are a King…

It beautifully solved my issue…