I am trying to make a Tarzan like game with Cocos2D and Box2D. I am having issues with the physics - making an object swing from one rope to another. I am not really sure how to do this. Could anyone please help me.

  • \$\begingroup\$ I found something pretty useful for rendering the rope cocos2d-iphone.org/archives/1112. but I don't understand most of the code so i'm having problems using it to solve my issue. \$\endgroup\$ Commented Feb 8, 2012 at 8:00
  • 1
    \$\begingroup\$ This site isn't the place to ask for a walk-through to build an entire game. That post you linked to looks like an excellent starting-point and should help you getting the ropes in place. Swinging from one rope to the other would be the next step, but it seems like you need the ropes first :) If that stuff is too complicated, I suggest you start with something easier to learn the basics? \$\endgroup\$
    – bummzack
    Commented Feb 8, 2012 at 8:08
  • \$\begingroup\$ Yes I understand. it's not that the verletrope code is too complicated. I just don't understand most of the math in the vrope and vstick classes. \$\endgroup\$ Commented Feb 8, 2012 at 15:52
  • \$\begingroup\$ I don't think you have to understand all the math behind it, as long as you're able to integrate it and adjust the parameters to your needs. \$\endgroup\$
    – bummzack
    Commented Feb 8, 2012 at 17:32
  • \$\begingroup\$ I am trying to get the ropes in place as you suggested. The author of the tutorial recommended that the vRope.h and vRope.mm classes be modified to take only one point/body and the update loops modified to include the last point (to get a free hanging rope). I've tried this but it's not working. I don't know what I am doing wrong. \$\endgroup\$ Commented Feb 16, 2012 at 9:21

1 Answer 1


Hey I dont know the exact answer to your question but I think you will find more code in the below link that you can look into for your project.

See the snapshots, I think the developer has used the same project that you have listed in the comments of your question.


  • \$\begingroup\$ thanks, very interesting, though a wish the author explained a bit more what he did. \$\endgroup\$ Commented Feb 16, 2012 at 9:23
  • \$\begingroup\$ Yeah I too feel that the developer should have given some imfo on how approached this idea. \$\endgroup\$
    – Robin
    Commented Feb 16, 2012 at 9:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .