Box2D Version 1.4.2 Released

News about Box2D
Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Box2D Version 1.4.2 Released

Postby Erin Catto » Fri Nov 02, 2007 9:20 pm

1.4.2
- Resolved revolute joint instability.

Please see TODO.txt for future plans.

Please see Readme.txt for instructions.

http://sourceforge.net/projects/box2d

skatehead
Posts: 131
Joined: Tue Sep 25, 2007 1:45 am

Re: Box2D Version 1.4.2 Released

Postby skatehead » Fri Nov 02, 2007 9:56 pm

Awesome work Erin, it works brilliantly, and I love the new demo =D.
Thanks a lot for spending your time on this.

Don't forget to make this thread an announcement too, almost didn't see it down the bottom there. (:

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: Box2D Version 1.4.2 Released

Postby Erin Catto » Fri Nov 02, 2007 11:32 pm

No problem. I'm actually really glad you found the problem. This should save other people a lot of grief.

Yes, I always forget to click the announcement option.

voxel
Posts: 8
Joined: Thu Sep 20, 2007 5:04 pm

Re: Box2D Version 1.4.2 Released

Postby voxel » Sun Nov 04, 2007 4:46 am

I've been behind on the release, but I see major speed increases compared to the Sept. versions. Great work!

skatehead
Posts: 131
Joined: Tue Sep 25, 2007 1:45 am

Re: Box2D Version 1.4.2 Released

Postby skatehead » Mon Nov 05, 2007 2:41 am

Hey Erin,
I'm really sorry to bother you again, but I think the changes made in 1.4.2 create a problem with limits in the revolute joint.
Joints seem to reach their limit, then slow down before turning around, as if it were a spring. And in some cases, the anchor point will detach.

Try this to see what I mean.

Code: Select all

      {
         b2BoxDef sd;
         sd.type = e_boxShape;
         sd.extents.Set(0.25f, 0.25f);
         sd.density = 1.0f;

         b2BodyDef bd;
         bd.AddShape(&sd);

         b2RevoluteJointDef jd;

         bd.position.Set(15.0f, 25.0f);
         b2Body* body = m_world->CreateBody(&bd);

         jd.anchorPoint.Set(0.0f, 25.0f);
         jd.body1 = m_world->m_groundBody;
         jd.body2 = body;
         jd.enableLimit = true;
         jd.lowerAngle = -30  / (180.0f/b2_pi);
         jd.upperAngle = 30  / (180.0f/b2_pi);
         m_world->CreateJoint(&jd);
      }

Don't worry about it too much, just if you have some spare time to take a look at it, that would be great.

Thanks,
-Matt.

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: Box2D Version 1.4.2 Released

Postby Erin Catto » Mon Nov 05, 2007 11:32 am

This is another known limitation. You have a highly unbalanced torque. You can fix this by making the shape larger. Ideally the shape would cover the anchor point (like a long box).

What is the scenario you are trying to model?

That said, this problem has bugged me for awhile, so I'll probably look at it again at some point.

BTW, I tried this with 1.4.1 and it went completely unstable, so things are getting better!

skatehead
Posts: 131
Joined: Tue Sep 25, 2007 1:45 am

Re: Box2D Version 1.4.2 Released

Postby skatehead » Mon Nov 05, 2007 9:26 pm

Sorry Erin, that was my bad.
I had disabled warm starting on the revolute joint when I was trying to find the problem with the exploding and I'd forgotten to enable it again.
So even joints between close objects were having trouble stopping at their limits.
I should have tested it more thoroughly before posting, I only tried the example I posted, which I can understand isn't really a correct use of the joint.

So everything is great now, sorry about that. :oops:

Thanks again for the update.
-Matt.


Return to “News”



Who is online

Users browsing this forum: No registered users and 1 guest