I have a pretty simple explosion set up:
It is a force component with a particle emitter added on.
On receiving damage, I see the following:
The function “Toggle Ragdoll Physics” is a C++ function that I made, that ragdolls the enemy. Here is my setup:
GetMesh()->SetAllBodiesSimulatePhysics(true);
GetMesh()->SetCollisionEnabled(ECollisionEnabled::PhysicsOnly);
GetMesh()->SetAllBodiesNotifyRigidBodyCollision(true);
if (GetMesh()->AnimClass)
{
GetMesh()->SetAnimInstanceClass(nullptr);
}
GetMesh()->SetSimulatePhysics(true);
GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision);
When these actors are getting hit, they are also getting destroyed, and I am scratching my head as to why. when the actors get hit, the response that I want is that they simply ragdoll and fall on the ground. But instead, they fall to the ground, and then after a few seconds, disappear. Is GC picking them up? Or, perhaps, is the damage applied passing a threshold I don’t know about, causing its destruction?

