0

How to find the combined center of gravity of several pymunk bodies. I know how to use the bodies' positions, masses and the relative distances to calculate it manually. Is there a built-in function to achieve the same purpose?

1 Answers1

0

No, for different bodies there is nu built in function (as of Pymunk 5.7).

(It would be possible to set mass directly on the shapes, then attach all of them to a single body and read it out from the body. But if you actually need several different bodies I think manual calculation is much easier)

viblo
  • 4,159
  • 4
  • 20
  • 28