- Home /
Using child colliders with rigidbodies/joints in 2D
I am trying to recreate something similar to what this person has done: https://youtu.be/mCGVxMqHYUk?t=262
I currently have an empty with a rigidbody2d attached and multiple children assigned to it, each with a Circle Collider 2d. Each child is also linked by a relative joint, which makes them behave like a softbody ball (as seen in the video), but this means they all require rigidbody2d, and therefore they behave independently of the parent, in terms of physics (eg, the children will fall and hit the ground and stop/bounce, and the parent will fall through). I wanted to know if there was someway to have the joints and then use the colliders as one large collider for the parent, as it would normally work if the children didn't have dynamic rigidbodies.
I tried attaching joints from each rigidbody to the parent, but that conflicted with the bouncy behavior. I also thought about updating the parent manually, or updating the colliders without the use of joints (which is what appears to be done in the video), but I don't know how viable either one is because they would probably conflict with the physics. If there is anyway to achieve this with the joints that would work the best, but otherwise I will some other way of doing it. If anyone knows any completely different methods of achieving a softbody effect in general, it would also be appreciated