Page 1 of 1

Create joint programmatically

PostPosted: Tue Mar 03, 2015 9:05 am
by PyHuT
When trying to create new joint i have error with 60% chance
"Internal Error: Dangling contact graph pointers detected."

My code:
Code: Select all
-(BOOL)ccPhysicsCollisionBegin:(CCPhysicsCollisionPair *)pair magneticObject:(CCNode *)nodeA Magnet:(CCNode *)nodeB{

    CCPhysicsJoint * joint = [CCPhysicsJoint connectedDistanceJointWithBodyA:nodeA.physicsBody
                                                                  bodyB:nodeB.physicsBody
                                                                anchorA:ccp(0, 0)
                                                                anchorB:ccp(0, 0)];
       
       

    return NO;
}

Don't understand why this happened - help me plz!