Prototyping dismembered limb as a reusable blueprint

I’m making a component that will be added to all characters in my project that handles dismemberment.

The idea would be that, when a certain limb needs to be removed, the bones of said limb will be set to hidden, and a static mesh identical to that limb’s specific mesh will be spawned in its place.

Spawning the mesh on its own wouldn’t be enough though: there are niagara emitters that need to be spawned for the blood, there’s a mesh for the stump that needs to be attached to the point where the limb is cut off and then the mesh of the actual limb that needs to drop on the ground. And all of this would be reused for pretty much every character (except, of course, for the fact that every one of them has different meshes, but the logic is the same).

So I decided to make all of this stuff a dedicated blueprint actor. I’m currently prototyping it with very simple logic but I’d like to know if this is an actually feasible way to proceed or if I’m creating something awfully unoptimized.

This is how it shows up, the idea being that the stump is the mesh attached to the character, while the “Lost Limb” simulates physics, so it would fall on the ground immediately.

When spawning the blueprint, this method needs to be called:

All the logic for niagara emitters is not present yet, but I hope this gives a general idea of what I’m trying to achieve.

Is this an appropriate way to proceed? Could this end up biting me later on? Currently my biggest fear (besides having to spawn 2 meshes every time) is that these 2 meshes belong to the same actor, but during gameplay they will end up being very far apart (like, a character loses an arm, then moves around the level) and I don’t know if this could screw up something.

Why attach the lost limb to the character ?

Just give it the right transform initially - you can use GetSocketTransform on the main mesh to get the right spawn transform - no need to use attach/snap here.

Because what I want to snap to the character’s mesh is the “Stump”. The “Lost Limb” would instead drop on the ground, starting its fall from right under the stump. I need a bloody stump to be attached to the character.

I could’ve snapped a “stump” mesh directly from my character’s blueprint/c++ code, but along with it comes the niagara emitter and whatever other logic I need to implement (ie: spawn a decal on the ground with blood splatter) and that needs to be reused for every single character that can be dismembered.

I wanted everything in a single blueprint actor in order to avoid code repetition.