Generating overlap events on a players mesh

Hello there! I have a sword I have been playing with, trying to get it to collide with my other players on the map. So far, I can get it to work if I overlap with the players capsule, but not their mesh. I have tried giving the mesh its own collision channel, I have tried using frame by frame line tracing in C++, but no matter what I do I can’t collide with the mesh.

What gives? I have played a bunch with the collision settings on the player mesh, I even made it identical to the capsule, but no matter what I do it won’t generate those overlap events.

I am also very open to other ideas. In the end I need to detect if a players sword went through their head, arm, leg, torso, etc.

Is the mesh a complex, perhaps animated or skinned, mesh? Collissions with arbitrary meshes are very expensive to calculate, hence the physics engine doesn’t support that.
The best you can do is build a number of proxy shapes that approximate the various parts of the mesh (typically, capsules, boxes, or convexes around the bones.)

It’s the default UE mannequin.

Yeah, I was only going to detect the collisions for maybe ~200ms on each swing so I thought I could avoid performance issues with that. Regardless, you’re right, that does seem like the proper solution here. The problem I have with that is - how do I get the shapes to move with the animations?

Nevermind, I think I got it :slight_smile:

Just in case anyone else had the same question and didn’t get an answer

Parent the shapes/boxes to the Mesh and for then attach them to a character bone or socket.

Sorry, I should have posted my solution. You’re 100% right, I made capsule components, added them to the mesh, and set the socket they are attached to.