Joint stretch problem

Hi,

Image
I'm trying to make 2 cart objects and connect it using revolute joint, so the back cart will follow the front cart, the problem comes when I start to accelerate the front cart, my revolute joint begin to stretching (see figure above).

I have this kind of problem back then, I was designing a single cart and the revolute joint for the wheels was stretched, the solution was by updating my box2d with the latest version in the svn, it works (viewtopic.php?f=8&t=4595). But now the same problem occurs and updating box2d doesn't seems to solve it.

I've created a very simple code which only do the figure above, and the result still the same. Any help would be appreciated.

Thanks.
i will be keeping an eye on this post, I've had the same problem with a log bridge, the bridge pieces would stretch far enough apart that things would be able to fall through. i made my joints stiffer by adding a gear and changing some values, then made my mouse-drag weaker... not the ideal solution. would love to see a rigid revolute joint solution!

great question.
I'm fairly new to Box2D, so sorry if this solution doesn't work. Wouldn't a distance joint do the same thing you're trying to do with a revolute joint, but give you more control over the stretching?

If you need the revolute joint to control the amount of rotation, is it possible to add a distance joint to help avoid this problem? I've had success with combining multiple types of joints for other problems, although I don't know the performance implications of this.

Hope this helps!
Dylan, thanks for your suggestion to use distance joint, it works perfectly!. Never try distance joint before, I thought it behave like prismatic joint (no rotation allowed). Now it's fixed. But I still wonder why my revolute joints are stretching..

Thanks again!.

Original thread: https://box2d.org/forum/viewtopic.php?t=5072