delete a contact list for a body

my ragdoll goes through the floor before the category bits change.. so when I change them, contacts are the same! so I think I must delete all contacts..
How can I do it easier? What should I delete?
You should not be changing the category bits. Instead implement a b2ContactFilter and use custom filtering.
I will need to disable/enable collisions anyway!
Let the function be internal, but I must clear the contacts for a body 😉
So you need enable a collision and then later disable it? Please explain.
When I animate my ragdoll, I disable collisions for it, after that, when it must act like a real ragdoll, I enable collisions again!
There's a player's body at the same place, and I don't need that some world objects block animation (but I'll look whether I can do everything without this)..
If you don't want your animating character to collide, why does it have bodies? Why not create the ragdoll when the character dies?
because creating a body is slow and I use bodies' vertices to draw my ragdolls/characters
and.. bodies are used to easily animate my characters! 😉
Creating a body not that slow. Almost every game out there with ragdolls creates the ragdoll when the character dies. Simulating a body is typically slower than creating a body.

Did you see your frame rate drop when you created a ragdoll?
I can't see the frame drop because I create all the ragdolls with everything!
I'll think about that anyway.. 🙂
If you are worried about dynamic creation of bodies create the ragdoll ahead of time but store it somewhere far removed from the playable world. When the character dies warp the ragdoll to the correct location.

-nick

Original thread: https://box2d.org/forum/viewtopic.php?t=634