I want to add a particle body (say Fire ) in front of another physical body ( arrow ). Thus, I use spring joint so that they are combined with a stiffness of about 20,000, but still its launch is the right way, and the particle of the body bounces off the arrow. Here is my code:
fire part
CCParticleSystem *explosion= [CCParticleSystem particleWithFile:@"bomb.plist"]; explosion.position = ccpAdd(projectilePos, ccp(16,0)); explosion.physicsBody.mass=1.0; explosion.physicsBody = [CCPhysicsBody bodyWithCircleOfRadius:16.0 andCenter:explosion.anchorPointInPoints]; explosion.physicsBody.type=CCPhysicsBodyTypeDynamic; explosion.physicsBody.affectedByGravity=FALSE; explosion.physicsBody.allowsRotation=FALSE;
arrow part
CCSprite *tempSprite; tempSprite = [CCSprite spriteWithImageNamed:@" arrow3@2x.png "]; [tempSprite setScale:0.05]; [tempSprite setScaleY:0.15]; tempSprite.rotation=rotation; tempSprite.position=dummyBow.position; tempSprite.name=[NSString stringWithFormat:@"%@,%d",[lifeOfSprite[1] objectForKey:@"name"],[[lifeOfSprite[1] objectForKey:@"life"] intValue]]; tempSprite.physicsBody = [CCPhysicsBody bodyWithRect:(CGRect){CGPointZero, tempSprite.contentSize} cornerRadius:0];
now the joint part
[CCPhysicsJoint connectedSpringJointWithBodyA:playerBomb.physicsBody bodyB:projectile.physicsBody anchorA:ccp(1,1) anchorB:ccp(600,0) restLength:0.f stiffness:20000.f damping:60.f]
![image loading]! [arrow with fire](https://fooobar.com//img/433af7d949372c83b6fc5abdbfc45c6a.png)

(DebugDraw)
fire should appear in front, but sways back with spring effect
Can anyone tell me where the problem is? Thanks in advance.
Adarsh ββroy
source share