Hi all, I’ve been struggling with this issue for AGES.
I have 2 characters that can fight with each other (punch, kick, etc.). When these characters overlap with each other, I am trying to get the name of the bone or body that has been overlapped on BOTH characters. e.g, I want to know Character 1 r_hand
overlapped with Character 2 spine_1
. Their meshes are configured with these collision settings:
Both characters have the WrestlingCharacterMesh
collision preset, which has Overlaps enabled for other WrestlingCharacterMesh
’s.
Generate overlap events and multi-body overlap is set to TRUE for all characters.
All characters have their physics asset correctly assigned. If I show collision in-engine, they look like this (can see collision being drawn around each of their physics bodies):
In C++ I bind an overlap event to each character’s mesh like this:
Owner->GetMesh()->OnComponentBeginOverlap.AddUniqueDynamic(this, &UPerformStrikeAction::OnStrikeCollision);
This event handler is simply logging information to the screen about each overlap. Here are the results that are shown when the 2 characters begin to overlap each other.
My bone name is always set to “None”.
Other bone name is always set to “None”.
My Item is always set to “-1”.
Other component name is always “CharacterMesh0”. (Correctly overlapping with the Mesh, not the CapsuleComponent).
Other body index is sometimes populated, which allows me to get some of the info I need. I still do not understand why it is often “-1” when colliding with CharacterMesh.
Am I approaching this problem incorrectly? I do not understand why Bone names are always None when both of the overlapping Components are SkeletalMeshComponents.
Any help is appreciated, been stuck on this for many weeks.