# Box2D Forums

 It is currently Tue May 21, 2013 11:39 am

 All times are UTC - 8 hours [ DST ]

 Page 1 of 1 [ 5 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: "Weld" type jointPosted: Sat Mar 08, 2008 11:47 am

Joined: Sat Mar 08, 2008 11:34 am
Posts: 2
Hey, just getting started with Box2D (flash), and found what seems to be a glaring omission to the joints: a "weld" joint, a joint that constrains on all 3 DOF.

Basically, my intended use is to provide rigidity to structures, then break the joint on force. Simulates nails, welds, etc. My current solution is to use a revolute or prismatic joint with extremely tight limiting, but this tends to result in joints that are a little "squishy" -- these joints seem to tend to have more give against their limits than against their constriants. Plus it's a lot more of a pain to set up than a simple weld would be, and I'm guessing a weld would be faster to compute, as well.

All in all though, enjoying the system a lot. Thanks!!

Top

 Post subject: Re: "Weld" type jointPosted: Sat Mar 08, 2008 12:05 pm

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Instead of a weld joint, I recommend using multiple shapes per body. Then use some heuristic based on contact data about when a shape should be split off into its own body.

With an iterative solver like the one in Box2D, a weld joint will never provide complete rigidity.

Top

 Post subject: Re: "Weld" type jointPosted: Sat Mar 08, 2008 3:58 pm

Joined: Sat Mar 08, 2008 11:34 am
Posts: 2
Yeah, I investigated doing it with that way (breaking apart shapes), but because constraints provide such a simple way of determining when to break, and breaking them is such a simple process, I'm willing to sacrifice a little rigidity for ease of use.

Now that I'm considering it more, I definitely see the advantages to doing it the way you describe and will progress in that direction (thanks! ), but I still feel that a weld joint is a kind of "basic component" that box2d could benefit from.

Top

 Post subject: Re: "Weld" type jointPosted: Sat Mar 08, 2008 7:21 pm

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Yeah, it would not be hard to implement the weld joint. I'm just concerned that people will go down the wrong route for breakable objects.

What would be better is some breakable body functionality. If you come up with a good solution, please consider submitting your code to improve Box2D.

Top

 Post subject: Re: "Weld" type jointPosted: Sat Aug 09, 2008 3:49 pm

Joined: Wed Jul 09, 2008 3:47 am
Posts: 37
Simple way to make weld joint is for example prismatic with both upper and lower limit set to 0.

I made simple breakable objects different way. When the object's health drops below zero, it is deleted and gibs are spawned on its position. I made gibs of polygon shapes with offset of their real relative position, so it looks very realistic

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 5 posts ]

 All times are UTC - 8 hours [ DST ]

#### Who is online

Users browsing this forum: No registered users and 0 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: