Cocos2d-x /c++ port of simple rope system for cocos2d using Verlet Integration.
The VRope-x was ported to Cocos2d-x (v2.0) by Creeng Ltd..
The port was made from VRope 0.4 made by Flightless, which was a modified version of the original implementation by patrickC. The Flightless version added a MIT license, which is also contained in this ported version.
// Create joint
b2RopeJoint* bodyAbodyBJoint = (b2RopeJoint*) world->CreateJoint(&jd);
// Create batchnode and vrope for joint (can also be made between two bodies)
CCSpriteBatchNode* batch = dynamic_cast<CCSpriteBatchNode*> (getChildByTag(KTagRopeBatchNode));
VRope* verlet = new VRope(bodyAbodyBJoint, batch);
// Update the verlets in the game loop
verlet->update(dt);
verlet->updateSprites();
See more usage examples from the original authors pages.