martende / box2d-html5

Automatically exported from code.google.com/p/box2d-html5
0 stars 0 forks source link

Behavior in 'domino tower' scene #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm converting some of my code from box2dweb to box2d-html5 so I can make use 
of all joints etc. Thanks for all your work on this!

I noticed one scene I had was giving quite different behavior to box2dweb, as 
shown in this video: http://youtu.be/17G7NsyqgsY

This tower should hold together reasonably well for a few seconds, and then 
start to crumble from the outside, with a large internal collapse after that. 
With box2d-html5 it appears that all parts of the tower collapse right away. 
Any ideas about what might be causing this? It's interesting that the bottom 
row of dominos does not have this problem (where one side of the contact is a 
static body).

Source code for the domino tower is attached.

Original issue reported on code.google.com by iforc...@gmail.com on 29 Jul 2014 at 12:12

Attachments:

GoogleCodeExporter commented 9 years ago
In the attached source code, there's an issue where it's passing 'world' to the 
makeDomino function instead of 'ddensity'.  I've added the Domino Tower test to 
the Testbed using the source from the dart-box2d project.  As far as I can 
tell, they are behaving the same way.  I did notice the Dart test has the 
position iterations set to 10 instead of 3.  Is there another version of the 
Domino Tower test for the C Box2D library?

Original comment by isaacbu...@gmail.com on 30 Sep 2014 at 5:12

GoogleCodeExporter commented 9 years ago
I don't think so. It was originally from the Chipmunk demos, but it's a nice 
example so I ported it for Box2D.

Original comment by iforc...@gmail.com on 30 Sep 2014 at 5:17

GoogleCodeExporter commented 9 years ago
I added a port of the PyramidTopple example from the Chipmunk 2D project.

https://github.com/slembcke/Chipmunk2D/blob/master/Demo/PyramidTopple.c

It appears to work, although it's using the same settings as the other tests.  
Some tests behave slightly differently perhaps due to numerical error with JS 
using doubles instead of floats.  Let me know if you'd like me to try something 
else.  I'm appreciate any feedback on the project.

I should also say, thank you for all your work on the iforce website.

Original comment by isaacbu...@gmail.com on 1 Oct 2014 at 3:55