• Advertisement
Sign in to follow this  

Verlet Sliding Problem

This topic is 4170 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

Hey Guys, Been viewing the forum for a while now, mostly been able to find what answers i could possibly need but now im at an end... I've been playing around with some verlet intergration things in 2d and i've run upon a problem when i create some complex shapes (such as a rigid circle), and i've noticed that when it hits a completely flat surface it starts to roll to one side, I'm guessing its down to the order of which i update particles or constraints between them... anyone any ideas of ways i can overcome this issue? Cheers. -Ste

Share this post


Link to post
Share on other sites
Advertisement
You want to be very careful that as you update your positions (constraints), you do not update using any of the new calculated positions.

For instance, say you update position 1 of a rigid body. If you then update position 2, it's going to use the new position for position 1, which is bad.

You can either update your rigid bodies in a random order each cycle, or keep a "temporary" position array and use that to store the new positions, then copy the new positions into the old positions after all calculations are finished.

Hope this makes sense, I'm typing in a state of mental fog :P

Share this post


Link to post
Share on other sites
Quote:
Original post by oliii
that introduces drift. A quick bodge would be to satisfy constraints one way going up the list, and then next time the other way, going down the list.

I tried that, it reduces the drift a fair amount, but it's just a hack really. Resting the object properly would be the way to go.


what oliii suggested in this topic

It works very well, or at least in my case.

Share this post


Link to post
Share on other sites
I've tried all sorts now..

the alternating order, the buffered positions.... and its still going walkies.. I create a soft body circle, it hits the floor and just walks to the right...

Any more suggestions?

Share this post


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

  • Advertisement