Reference a Bone In Blue Prints

Talking with a coworker and working on a game where body shots can be made. Is there a way to reference a bone in the skeleton mesh to apply damage to just that area?
Alternatively, I was thinking of adding a collision box to that area in the mannequin blueprint, but was thinking the box may not move with the player as they walked or ran.

Any suggestions?

On a hit event (FHitResult) you should be able to read the bone / socket name and the hit component. You can store damage on your character in a map of key bone name to value damage.

This does not deform with the player skeleton unless you make it so, so it could be inaccurate. I’d use the skeletal mesh its collision.

1 Like

the physics asset is used for bone hit detection, and it already follows bones during animation.

you can change the colliders in the physics asset to conform to the mesh more closely.

In my game I have arrows stick in body part where they were shot and apply damage based on what part it is. This is all just using in-built functionality of the physics asset.

Left side - select bones
Right bottom - generate new colliders (i use multi convex hull)
Left side - filter it to just show colliders and you’ll see the names. You can identify these in blueprint from the hit detection. I just convert to a string and search for common words since I have a few different skeletons to check.

Applying damage:






1 Like