Multiple Fixtures per body at different positions

Hi,

I need to approximate an egg shape, and want to use 5 different shaped circles overlapping to approximate it. I don't want to use joints as they can get distorted sometimes, so want to add them to one body as multiple offset fixtures?

..also the fixtures need to overlap?

Regards

i
what is the question
😉
Hi

Just wanted to understand how to position fixtures at different positions in a body, I guess position(0,0) is relative to the body itself...and another question is can fixtures overlap in a body, without having to set a collision group. Also can the fixtures have different densities so I can try and bottom weight the egg to make it right itself!

..oh and do you know how to make physics eggs (only joking!)

Regards

i
Just set the m_p member of b2CircleShape, the position is relative to the body position. Yes to all other questions.
thanks...I now have a working egg...which corrects itself!
Did you look at the Compound Shapes demo in the testbed?
Hi,

Got it working thanks. Wasn't sure if they could overlap but it appears they can.

Regards

i

Original thread: https://box2d.org/forum/viewtopic.php?t=5659