Rope physics

Hi! Is there any tutorials on programming a realistic looking (2d) swinging rope,just like those seen in Pitfall_Jungle mobile (java) game . I have googled on subject ,but find nothing :frowning: ,so You are my last hope :slight_smile:

you could maybe try the Verlet integration technique detailed in this article:

http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml

if the rope was made of a number of constrained particles it may work.

Dan.

edit: posted before i finished typing :slight_smile:

Thank You very much! indeed - this article is closest to what I need ! :smiley:

BallJoints are the best way to go. Just connect multiple boxes together with BallJoints and away you go!

Then to make a rope look like a proper rope, not just a bunch of boxes, construct a trimesh over the boxes that extends from one end of the box, to the other end of the same box, then from the end of the first box to the start of the second…etc

Thats the way im currently doing it, and thats also the way to make Cloth too (or even a matress!).

A similar approach can be taken for ragdolls. Boxes also connected via ball joints, however, those boxes control certain vertices of the mesh, so as they move, they move the vertices with them…

However, making this in a nice API way to use for future (i.e not just for a specific box setup for a specific model that is one legged, has a beared and a pony tail) is near to being a nightmare :slight_smile:

Hope that gives you some ideas…