Ho to realize rope or silk thread.

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Magnet
Posts: 101
Joined: Wed Sep 27, 2006 7:32 pm

Ho to realize rope or silk thread.

Post by Magnet »

Ho to realize rope or silk thread.
Anyone have ideas?
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

have a look for newton.... there is a tut how to build a physikal rope... out of a cain of objects..
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

If you don't want to integtrate a physics engine or do complex physics you can write it your own pretty easily.

A rope/string is basically a series of interconnected points, and the distance between points has a fixed maximum. When a point is pulled, it pulls the points on either side, and those points pull the points they are attached to.

To make the rope look less segmented, you can use the points to make up a curve or spline.

Travis
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

the transition of each point would be multiplied 1/d^2 d being the distance between the pushing/ pulling point and the point being calculated.

ie applied force/d^2

if the rope is thin enough you wont need to join the verts of each segment
Post Reply