What is the proper way to inflict damage using sockets?

#Per Bone Sword Collision

I developed a per-bone sword collision system that takes animations into account.

Here’s a video!

Epic wiki link


you need do simple traces to identify which actor is in front of the weapon

then do a component level trace (see primitivecomponent.h) against the mesh of the character that is found in front of player

you need to do the traces from the weapon in the direction it is moving. Calculate the socket’s normalized velocity (direction) by getting the prev and current socket position

make several sockets along the length of the weapon and trace in the direction the sword is moving

all the above traces are simple

only once you have detected a character in front of sword do you switch to component trace

and you should only do the component trace from the 1 socket where the simple trace connected

multiple component traces can get expensive