Create joint programmatically

Discuss new features and future development.
Post Reply
PyHuT
Posts: 1
Joined: Tue Mar 03, 2015 8:56 am
Contact:

Create joint programmatically

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests