Jump to content
  • Advertisement
Sign in to follow this  

rope using stick contraints

This topic is 4729 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Changing gravity wont have any effect, you need to add some drag to resist the movement.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah just multiply all the vels by a factor (as you say 0.999), should come to a stop quite nicely.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!