I have a problem when rotating a triangular image like a radar detecting enemies.
b2Body *body;
CCSprite *actor;
if (b->GetType() == b2_kinematicBody && myActor == [loader spriteWithUniqueName:@"radar."]){
radar = b;
radarSprite = myActor;
}
It is a kinematic Body made with LevelHelper, and I want to rotate it. So I need it to rotate around a static point, and repeat the movement backwards. Since it is a Body and not a Sprite, I don't know how to make it to rotate around the top point.
I have an idea, but I'm not sure. What about if I rotate the CCSprite and move the Body to sprite.position? Is it possible?
Thank you very much