Disabling a Rigidbody?

I’m starting to get the impression this is not possible, since I can’t find anything about it, anywhere.

I have a parent object that has a bunch of children, all of which behave independently under physics control, so each child has a rigidbody attached. However, the user needs to be able to drag the parent/children around as a group. I use a spring joint to drag, so the dragged object interacts with other objects in the scene, bouncing off rather than going through them.

I’ve tried every possible combination of rigidbodies and colliders, and found that the dragged object can have only one rigidbody, the parent. Any child object that also has a rigidbody while being dragged, ignores collisions and the child will get dragged through things (also makes the spring behave erratically). Setting the child RBs to kinematic makes no difference, nor does any other RB setting (can’t set the mass to zero). The only solution seems to be to remove the child RBs while dragging, leaving just the parent’s. Which is a pain, since each child has a unique mass, drag, etc., so destroying/adding RBs gets messy.

Rigidbodies cannot be disabled (enabled = false), nor can they be deactivated (active = false). So is there any way to get rid of a child rigidbody’s effects while dragging without removing and adding it back later?

You’ll have to save the values and destroy it, I’m afraid. It’s annoying, I know, but there’s no way around it that I’ve ever found.

That’s what I was afraid of. Some children also have hinge joints and spring joints that have connected bodies, so it’s not just setting mass and drag. It’s certainly doable, but a major PITA.

And I just discovered that you can’t remove a rigidbody if there is a hinge joint attached. You first have to remove the hinge joint and then reattach it and set it up again.

One thing I’ve noticed, if you drag a non kinematic object around with a spring joint, most of the time the dragged object stops when it hits a static collider. But if the static collider is too thin or too small, the dragged object can sometimes be dragged through it if it’s moving fast. I haven’t found a solution for this. Changing collision detection mode makes no difference.