Any way to effectively pool ragdolls?

I’ve been optimizing a game wherein ragdolls are thrown. Most of the performance issues are regarding instantiations. When I tried to reuse a ragdoll as part of an object pool, though, it seems as if its joints are being reset when I bring it back to the original position, but they’re being reset in a bizarre way that makes the newly-reset ragdoll look freakish.

Has anyone used ragdolls with object pooling before? What’s the trick?

Hi,

In Start(), make note of localRotations of all the bones of the character. Before you reactivate the ragdoll, rotate all bones back to their default localRotations, so the joints will be re-initiated the same way as before.

I agree with you though, I don’t know why the joints are re-sampled when the GameObjects are reactivated.

1 Like

7 years later your post was the solution to my ragdoll pooling problem. Awesome!