Rotation of multiple objects

Hi,
how would i go about making a group of objects and rotate them all together as if it was one object?
Thanks,
Đani
I guess it depends if you need them to always rotate/move together or not. If you do, I think you can just add a bunch of shapes to a single body, and then rotate the body. I haven't tried this, but I think compound shapes don't have to be touching.

If you need them to moving around separately and then sometimes move as a group you would have to do math to calculate how to move them to rotate them around a specific world point.
brainclog wrote:
I guess it depends if you need them to always rotate/move together or not. If you do, I think you can just add a bunch of shapes to a single body, and then rotate the body. I haven't tried this, but I think compound shapes don't have to be touching.

If you need them to moving around separately and then sometimes move as a group you would have to do math to calculate how to move them to rotate them around a specific world point.

yes, I guess the first one will do, i just discovered localRotation property of shapes so there are many possibilities...
I'm starting to like this engine...

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