How to make verlet rope elastic?

How to make verlet rope elastic?
0.0 0


Good day to all!

I would like to know how I can make the rope elastic?
I am using the verlet rope class, Here is the code fragment:

b2RopeJointDef jd;

//define bodies

jd.localAnchorA = b2Vec2(0,0);
jd.localAnchorB = b2Vec2(0,0);

jd.maxLength= (b~~>GetPosition~~ a~~>GetPosition).Length;
b2RopeJoint* bodyAbodyBJoint = world~~>CreateJoint(&jd); //create joint

CCSpriteBatchNode* batch = dynamic_cast<CCSpriteBatchNode*> (getChildByTag(KTagRopeBatchNode));
VRope* verlet = new VRope(bodyAbodyBJoint, batch);
return verlet;

Any help is appreciated! :slight_smile:


I recommend checking out this rope implementation , which i used in and works great for me

the drawback is parts of the rope cannot collide with another body