Jump to content
  • Advertisement
Sign in to follow this  
mokaschitta

Distance Constraint

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

Hi,

I am currently trying to understand the theory behind soft distance constraints as discussed in the 2010 GDC presentation of the Box2D creator (can be found here http://www.box2d.org/) since they seem to be a great way to model rather stiff springs that are always stable. Anyways my main problem is that until now the only types of constraints I used are ordinary springs. How exactly is a distance/rigid constraint expressed in the first place? I am not sure why, but google didn't really help me on that subject, so maybe I am just looking for the wrong terms. Basically how can I connect two points A and B with a distance/rigid constraint ? Any links, short code snippets would be great!

Thanks

Share this post


Link to post
Share on other sites
Advertisement
I've found Jacobson's article to be a great starting point for setting up simple physics things. The article explains how to get a servicable particle physics system going (which can be used to simulate more than you might think) and it shows how to create so called stick constrains (basically fixed distance constraints) between two points. I'm not sure if it'll work with the Box2D stuff, but it might prove an interesting read. The basic idea is that given enough iterations in which you set points A and B at a fixed distance (this is what Jacobson calls relaxation), the points will end up at acceptable locations.

Share this post


Link to post
Share on other sites

Hi,

I am currently trying to understand the theory behind soft distance constraints as discussed in the 2010 GDC presentation of the Box2D creator (can be found here http://www.box2d.org/) since they seem to be a great way to model rather stiff springs that are always stable. Anyways my main problem is that until now the only types of constraints I used are ordinary springs. How exactly is a distance/rigid constraint expressed in the first place? I am not sure why, but google didn't really help me on that subject, so maybe I am just looking for the wrong terms. Basically how can I connect two points A and B with a distance/rigid constraint ? Any links, short code snippets would be great!

Thanks


I discuss the implementation of a distance constraint in my blog post:

http://www.wildbunny.co.uk/blog/2011/04/06/physics-engines-for-dummies/

Hope that helps!

Cheers, Paul.

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!