problem syncing rotations between box2D and CCSprite with different anchor rotation points

hello y’all!

i have our new cocos2d-x project running with box2d and it works so far.
the current problem is syncing the rotations - the radians are in sync (i know the formula),
but because of the different anchor rotation points the resulting final sprite quad transformations are obviously different.

for example while my box2d shape (i.e. a quad) is rotated around its center of mass (the same as the center of the geometry in this case),
my anchor point (which is used for rotations) of the sprite is at (0, 0) instead of the default sprite quad center (0.5, 0.5).
the reason for the anchor point difference has to do with the level loading process.
of course i could patch that but i think i will have the problem anyway, because we will not only support symmetrical shapes with rotation around its geometrical center.

while i can figure out the math for the rotation, i wonder how this can be achieved most easily?
is subclassing CCSprite and manipulating CCSprite::m_tTransform and CCSprite::m_sQuad respectively the way to go?

any input welcome, cheers!

Did you try setting sprite’s anchor point to (0.5, 0.5) and IsRelativeAnchorPoint to false?

as i tried to explain, this works.
but i we might soon have non-rectangular shapes that do not rotate around the center.

I would just set the sprites anchor point to (0.5, 0.5) and let box2d handle the rotations.

Sprites seem to rotate fine around any clicked on point as an example in the Box2D Testbed, and this would be the same as rotating around a different point