[Question] Colliding Mesh

Hi,

So, I’m trying to get an effect, where when one of my characters swings at another character with their hand, it will decrease their health. (i.e. Punching, Slapping, Scratching them). My issue, is that I can only find Event Hit, and Event Overlap. And the mesh only has OnComponentOverlap (Which I believe is localized to the owning blueprint).

So, My question is, how do I check when a mesh of one character is colliding with another character, and how do i then determine which bone of the attacking character is colliding with the other character (To verify that they’re attacking with their hands, and it’s not like the foot bumping into them or something).

I’m trying to keep it all to blueprints for the time being. I’ve already tried a few things, But the best result I’ve managed to get is when the attacker bumps into the attacker, it decreases the health. Any help would be awesome.

Thanks,
Nate

#My Trace for Closest Bone Blueprint Node For You

I made a custom BP node to do exactly what you are asking,

and I also made BP nodes to make tracing from a character socket (the swinging hand) easy!

See my TraceData Nodes
http://forums.epicgames.com/threads/977316-(21)-Rama-s-Blueprint-Node-Library-As-a-Plugin-For-You!-No-Code-Compile-Required?p=31719668&viewfull=1#post31719668

and my Trace for Closest Bone Node
http://forums.epicgames.com/threads/977316-(17)-Rama-s-Blueprint-Node-Library-As-a-Plugin-For-You!-No-Code-Compile-Required?p=31719668&viewfull=1#post31719668

and just combine them !

(my trace for socket and trace for bone nodes work the same way)

#No C++ Required

My additional nodes are a plugin, and a very small download of about 6mb

Installation instructions and download link here:
http://forums.epicgames.com/threads/977316-(36)Rama-s-Blueprint-Nodes-Plugin-For-You!-Set-Scene-Component-Mobility

#Summary and Implementation

Use my TraceData node to trace from the socket of your character’s skeletal Mesh hand a short distance, for the continuous duration of your swinging anim montage.

Use my TraceData nodes to Draw the Trace so you get a visual of what the short trace is doing

My Trace for Closest Bone will tell you when the character’s hand is reaching an actual physical part of the other character’s mesh, not just their capsule collision volume, and what exact bone was hit

You could stop doing the continuous tracing when the first bone name is returned by my function as a successful impact has occurred.

#What Direction For Trace?

You can arrange a socket on your skel mesh at the fist location that is by default facing in the direction of the knuckles or claws or whatever

and then instead of using the Actor’s Rotation as I use in the graph above, you can get the socket rotation of your Hand Socket, which will be accurate during the animation montage of swinging :slight_smile:

Enjooooy

Rama

Alternatively, attach a shape component - sphere or capsule preferably - to the hands of your mesh, then enable overlap events for them.

Once the overlap event happens, take the informatin provided to calculate the bone hit etc.

This can be done using the functions that Rama provided.