Ragdoll Not Responding to Applied Force After Explosion Impact

IcestormZer0

New member
I have implemented a custom damage processor for handling explosions in my game, and it successfully triggers the ragdoll effect when a character is struck. However, the ragdoll doesn't seem to respond to the applied force—it just activates without any movement.

I’ve ensured that the force is being calculated and applied, but it appears to have no effect on the ragdoll.

I went through many of the "OnDeath" events to see what I could be missing but after quite a bit of testing, I wasn't able to locate it.
 
Ensure you are applying the ragdoll forces after the colliders have switched to non-kinematic. If the colliders are kinematic then the forces won't be applied.
 
I created an event identical to "OnDeath" and it's running through EnableRagdoll in the same way, turning isKenematic off then applying the force. right now when Ragdoll is enabled(outside of death), it's still showing the ragdoll effect but they're just slumped over, with their head, arms and legs flailing around until I stop the ability and they go back to normal. They don't get pushed back at all or even fall to the ground completely, like something is holding them up. When they die, it acts as it normally should.
 
Could it be that your force isn't large enough for it to affect the ragdoll? The ragdoll uses Unity's physics engine so once the colliders are no longer kinematic the character controller doesn't exert any forces on it.
 
When the player dies from something with a knockback, it works fine. I tried adjusting the force amount, but it didn’t help. just made each individual collider / body part move around more sporadic. It's like the player is stuck by some force.
 
Have you tried comparing your setup to Ragdoll.EnableRagdoll? You can add a force to this method and it should be a good to be able to compare.
 
Hey Justin, thanks for all your help. Turns out the majority of the issue was with my calculation of the knockback. instead of knocking the player back, it would knock him straight down. which is why all the weird behavior. And the characterIK wasn't being disabled, which caused issues. All good now.
 
Back
Top