How to connect objects and move together

Hi everyone, I simply want to connect number of game objects and move them around. Each circle is able to move whole thing. I tried with hinge joint however only the parent can move. What else can I use? I am lost in joints, ropes, line renderer to connect objects and cant find a way for this easy thing.

2941524--217702--circle.png

You could set the pressed one to be the new parent of the group.

Or you can have the pressed one move the whole group directly without parenting.

Or you can give the whole group a parent GameObject, and have every circle tell the parent to move with the drag, plus the local position of the circle to keep the correct circle aligned with the mouse.

Or have the parent listening for any of the child objects being clicked and react accordingly.

If you want to use physics there’s the Relative Joint 2D

1 Like