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!