in my game im having one Ccsprite for arrow, and one b2body for ball... im trying to throw ball at direction which is pointed by my arrow sprite. here is my code... i'm counting rotation of arrow sprite and then applying impulse to ball at that angle...
float totalRotation = arrow.rotation ;
ballBody->ApplyLinearImpulse(b2Vec2(10.0f+cos(totalRotation)*25.0f,10.0f+sin(totalRotation)*25.0f), eggBody->GetWorldCenter());
BUt, this not working exactly...ball is getting thrown in improper direction.