Physics libraries, bodies inside bodies

I want to make a simulation that has bodies inside bodies. The only way I have been able to achieve this is by making blobby bodies by Daniel Shiffman and then making new bodies inside the blob. How could I try to make more rigid structures, such that other smaller bodies can be contained inside it? Should I be combining Constant volume joint with distance joints…?
Or is there another library that I could try out
Thanks :slight_smile:

Hi @opheliagame,

Would you mind being a little bit more specific ? Maybe providing a hand-drawing or a diagram of what you have in mind ?

Am I correct in understanding that you would like to have rigid bodies (as 2D polygons) whose shape is preserved when colliding with each other ? And having the possibility to create other rigid bodies inside of a larger one ?

My first guess would be to try with the Fisica library using the FPoly() class or with any other library that deals with rigid bodies (like Box2D). I can think of other workarounds but not sure it would work in your case.

Hi @solub Thank you for replying :slight_smile:
Yes exactly, I do want rigid bodies inside other rigid bodies. This term did not strike me while posting the question.
I did think about creating shapes that have a hole, but I am not sure of how to go about this with respect to the vertices. I did now know about the Fisica library before, so will definitely check that out!

The simulation I have in mind is pretty simple in concept, I just want some smaller bodies inside a bigger body. And as a second step, packing the bigger body’s inner volume with the smaller bodies.