I have b2Body of which i set angle using setTransform. But I want b2Body to move in particular angle. My CCSprite is moving in that angle using ccMoveBy. But my b2Body is not moving with that CCSprite. So I thought of using setTransform. I set the angle with the same value by which I'm moving CCSprite. But still b2Body moves somewhere else.
I have used it like
b->setTransform(b->getPosition(),30*DEG_TO_RED);
b->setLinearVelocity(b2Vec2(120,180));
Any help is grealy appreciated.
Thank you,.