I'm using Cocos2D with Box2D, and moving from bodies with a single fixture to bodies with multiple fixtures, each with a corresponding sprite. By using
body->GetTranform().p.x + shape->m_centroid.x
body->GetTranform().p.y + shape->m_centroid.y
body->GetTransform().q.GetAngle()
I am able to position the sprites properly, until the body is rotated. At that point, all goes awry, with each sprite spinning in relation to its siblings, and the whole group spinning off around what I think is a (0, 0) body anchor point.
My guess is that Cocos2D/Box2D has a simple, built-in method for performing the necessary transform, but I haven't been able to find it documented. What is the best way to position my sprites correctly?