i am using:
cpVect vector1=cpv(angle, 400);
[body applyForce:vector1 offset:vector1];
but this not working well as needed to put a correct angle using touch screen below line of code used for getting angle
-(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
for( UITouch *touch in touches )
{
CGPoint location = [touch locationInView: [touch view]];
location = [[CCDirector sharedDirector] convertToGL: location];
float angleRadians = atanf((float)location.y/ (float)location.x-1);
float angleDegrees = CC_RADIANS_TO_DEGREES(angleRadians);
float cocosAngle = -1 * angleDegrees;
angle = angleDegrees + 30;
}
}
Thanks to you all for your precious time to give on that. Finally i found the way to achieve impulse on a chipmunk body on a specific direction. Now i am using below code.
// applyImpulse gives the right way for putting impulse as needed using above sin and cos theta values.