I know this has been discussed many times and is considered to be bad practice.
What I am wanting to do is click and drag multiple objects that already have rigidbodies. These are currently moved by parenting them to an empty game object with rigidbody, that is moved via spring joint to another empty game object moved by transform.
Currently I have:
[dragging object] <- Rigidbody (kinematic), moved via transform
|
| <- spring Joint
|
[empty parent obj] <- Rigidbody (not kinematic / rotation locked) moved via spring joint
/ | \
/ | \ <- Parenting
/ | \
[child] [child] [child] <- Multiple child Rigidbodies (kinematic)
I want to be able to have all of the children drag in unison and this current setup DOES work, except it doesn’t have collisions as a group (ie, if child to the left runs into an immovable wall, the whole group doesn’t stop)
I know about the compound collider thing, that if I were to dynamically remove all child rigidbodies that would work the way I want. But many of the child objects (before moving) will have joints, forces, etc that would make frequently removing/adding rigidbodies a pain.
I’ve tried a few methods using joints instead of parenting, but even with adjusting the spring/joint settings, the objects seem to bounce, spin, etc in a way I don’t want.
Is there any good way to move a group of separate objects as a collective without removing the rigidbodies?