clark Posted December 6, 2014 Share Posted December 6, 2014 This is not down to just p2 physics. In 2009 when playing with Box2d in Flash I experienced the same thing. So 2 techs with 2 independent code bases. Head over here to p2 https://schteppe.github.io/p2.js/demos/constraints.html And spin the rope in a circular motion from the top non static shape, you will see the shapes go from thisooooooooooo to this o o o o o o o o o o o o o o o The joints tear basically and become elastic. Infact, any physics experiment I have wanted to play with suffers from this tearing joint problem. Ball and Chains, having a spiderman shoot webs, ragdolls, even 2d cars if the landing is hard enough.I asked Schteppe on Twitter what causes this and he said Constraint solver failure probably. Or maybe something with the time step being too large. I was looking into this, but I am having no real luck and I want to save him the pain of a twitter convo about it. When we use a rigid body physics engine in our Virtual Machines, are we getting a close approximation of the original library (excl p2)? If I take a C++ Box2D codebase, it is clearly faster, perhaps no tearing occurs because perhaps it runs at 100 iterations. But the best we can do is run it at 10 iterations due to performance concerns, and the cost of doing that is simply inaccuracy with constraints?Edited:If difficulty was no object. What is the best language out there with 2d physics and a 2d renderer in any accessible platform? If I wanted to make silly 2d physics toys, what do the big boys use? Link to comment Share on other sites More sharing options...
JustPaul Posted December 6, 2014 Share Posted December 6, 2014 I had similar issues a couple of years ago using Farseer, which is based on Box2D, in XNA. Your demo reminds me of my models being ripped apart... and the joints would indeed completely break under some conditions. Link to comment Share on other sites More sharing options...
Recommended Posts