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.