I was a bit surprised by this when I did it. I have an Animator controlled character that is also rigged up as a ragdoll. The idea being that each Rigidbody in the ragdoll is set to kinematic and the Animator controls the skeleton. When the character dies the Animator gets disabled and each Rigidbody gets the kinematic flag switched off. It works perfectly, but the performance is very very poor when you get in the range of 100 characters at a time. Using non-ragdoll versions of the same character does not hinder performance.
I had assumed that setting kinematic to true for all the Rigidbodies would remove them from the physics calculations. Of course - the next step would be to swap the character out with a ragdoll version and traverse the skeleton to match position and rotation. Just wanted to see if anyone had any other thoughts before I go down that path.
the animator will still work even if you didn’t set it to kinematic. so it won’t perform the physics until the animator is off. although you can still do the whole set kinematic although it’s not registering physics it will still register collision contacts. since you said you have about 100 object that have their parts being turned to not kinematic it makes sense to lag a little because you have to go through all of those object. on the other hand too it depends on your character itself, textures and geometry count and the shader being use and whether it’s being batched or not. all of those things can have a impact of performance.
one main focus would be your drawcalls too. if it’s over the 1k then yeah you will see some stuttering and lag going on unless you have a powerfull computer to counter act that.
Yeah, kinematic rigidbodies are not free - in particular they can still knock things out of their way, so physics calculations are still performed when they move.
The solution I’m using is to have my characters use non-physics-rigged skeletons most of the time, and then when I want to ragdoll someone, I actually swap their skeleton over and rebind their skinned mesh. This is a pre-mecanim thing though, I don’t know whether that complicates things.
@foxter - I noted in the OP that a non-ragdolled version that is identical did not cause performance to be poor. That’s how I narrowed it down to the rigidbodies.
Sort of what I did. I simply swap out a different prefab completely though.