Testers wanted

You're using that (1.4.3)? I have considered moving it the main branch, and decided against it:
  • The code is a mess.
  • It's buggy, too.
  • I never did arc-arc contacts, eliminating the possibility of using the shape type for dynamic shapes.
  • Now shaktool has released line segments, it seems a bit pointless to use my shapes for static stuff either, as line segments work pretty well, and one could probably write static arc segments with less work than is required to clean up what I've got so far.

So no. Sometime I'll return to the project and make a proper go of it (or do static arc segments), but no time soon.

I do have a half-updated/improved-to-2.0 version that I don't think I've ever released. You can have that if you are happy working trying to make it work.
At first I was incredulous that you were abandoning such a useful add-on, but then I decided to run some tests. I haven't used shaktool's line segments code yet, so I created a concave arc out of many polygons and put it in a level with an equivalent concave arc. Basically I created a couple poor-man's sonic-the-hedgehog loops.

Turns out the many-polygon approach was WAY more stable than the concave arc. Even when I was using the concave arc, I found I had to reinforce it with boxes to keep things from tunneling through it.

So Boris, I'm taking your ConcaveArc code out back and burying it. Now I can upgrade!
mayobutter wrote:
poor-man's sonic-the-hedgehog loops

HAHAHAH!!!
poor sonic.... hell get splinters and nail cuts from your rickety poor mans loop.
Boris,

The Prismatic Joint seems to be very unstable. Here's a couple examples:

http://www.sideroller.com/PhysTest.swf

Keep dragging the ball to the left & right until it blows up.

http://www.sideroller.com/demo.swf

Drag the ball into the box on the right (which is also connected to a prismatic joint). Everything explodes.

Other than that, I really like how the Prismatic Joint no longer "wobbles." 🙂
Ah, spotted. It only manifests when body1 is not ground.
Try this patch, does that resolve both cases (I only tested the first).
Code:
Index: Source/Box2D/Dynamics/Joints/b2PrismaticJoint.as
===================================================================
--- Source/Box2D/Dynamics/Joints/b2PrismaticJoint.as   (revision 31)
+++ Source/Box2D/Dynamics/Joints/b2PrismaticJoint.as   (working copy)
@@ -433,7 +433,7 @@
         
         //b2Vec2 P = m_impulse.x * m_perp + (m_motorImpulse + m_impulse.z) * m_axis;
         var PX:Number = m_impulse.x * m_perp.x + (m_motorImpulse + m_impulse.z) * m_axis.x;
-         var PY:Number = m_impulse.y * m_perp.y + (m_motorImpulse + m_impulse.z) * m_axis.y;
+         var PY:Number = m_impulse.x * m_perp.y + (m_motorImpulse + m_impulse.z) * m_axis.y;
         var L1:Number = m_impulse.x * m_s1 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a1;
         var L2:Number = m_impulse.x * m_s2 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a2;


If not, please gimme a small source example demonstrating it.
Awesome, looks like that fixed it!

http://www.sideroller.com/demo2.swf

On another note - I'm playing with gears right now (revolute to revolute). I know the manual states, "Box2D requires that the revolute and prismatic joints were created with the ground as body1", however, I used to be able to abuse this rule with some fun results. The Gear Joint would take anything I threw at it - even 4 dynamic bodies. It looks like I can still break the rules in certain cases... but other times it explodes. I'm trying to pin down the conditions right now...


EDIT: Nevermind. Pulleys and Gears work as advertised. Good enough. Thanks for the quick fix, Boris.

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