Jump to content
  • Advertisement
Sign in to follow this  
PrestoChung

Position constraints converging slowly (contacts)

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

I implemented an iterative constraint solver using impulses as described in Bender & Schmitt 2006:

 

http://www.researchgate.net/publication/228934234_Constraint-based_collision_and_contact_handling_using_impulses

 

Solving for the normal (penetration) constraint or the tangent constraint in isolation converges as expected, about 4-5 iterations before the penetration or tangent position is within the 'target' range (<0.0001). But running both constraints simultaneously causes 150+ iterations before they are both within target which sounds like too much for a single constraint, but maybe it is expected for a tight constraint?

Edited by PrestoChung

Share this post


Link to post
Share on other sites
Advertisement

The target range should be something that is numerical significant, but visually not. Try e.g. 0.005f if you use meters. 

Edited by Dirk Gregorius

Share this post


Link to post
Share on other sites

Oops, actually the target range was 0.0001 (edited the original post to fix this) which is 1/10 of the collision tolerance (0.001). Seems I can get away with 0.0004 (7 iterations) but after that it starts going up rather quickly (0.0003 -> 28 iterations, 0.0002 -> 70+ iterations). Hopefully that will be stable enough for stacking.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!