views:

6

answers:

0

Any ideas how this addSpringToBody works?

    cpConstraint *joint = [space addSpringToBody:block fromBody:ball2 toBodyAnchor:cpvzero fromBodyAnchor:cpvzero restLength:0.0f stiffness:1.0f damping:0.0f];


    cpConstraintNode *jointNode = [cpConstraintNode nodeWithConstraint:joint];
    jointNode.color = ccWHITE;
    jointNode.lineWidth = 2.0f; 

    [self addChild:ball2Sprite];
    [self addChild:blockSprite]; 
    [self addChild:ballSprite]; 
    [self addChild:jointNode];

There is not enough documentation on the web!