rope using stick contraints

Started by
3 comments, last by GameDev.net 18 years, 10 months ago
im trying to make a rope. im just connecting 20 particles is a string using stick constraints. Im using verlet integration basicly straight out of the jackobson paper. My problem is my string wont stop moving. Ive upped the gravity to a crazy amount and it will fall, but at that point it swings back and forth like a pendelum. It wont stop no matter how high my gravity and no matter how many time i apply my constraints. Does anyone know how to relax it a bit ?? Thanks raymond.
Advertisement
Changing gravity wont have any effect, you need to add some drag to resist the movement.
I don't know anything about the implementation but shouldn't a pendulum (i.e. your rope) swing for ever without external forces on it like some kind of friction?
should i just multiply my velocity by 0.9999? thats what the paper said to do too. But i use to sticks to just move the particles i dont change the velocity at all. just

p0.pos += 0.5 * dif;
p1.pos -= 0.5 * dif;
dif is a distance to move the particle so that
Len(p0-p1) = restLen
its like the sticks wont solve even at 50 iterations per frame
Yeah just multiply all the vels by a factor (as you say 0.999), should come to a stop quite nicely.

This topic is closed to new replies.

Advertisement