In this demo, I'm creating circular shapes in box2D, composed of 14 triangles each, grouped into compound shapes...
http://studio.barliesque.com/temp/Compound.swf
...the balls bounce extremely oddly, sort of easing into place before bouncing back. Sometimes they'll even overlap!
The mass of each compound shape is set automatically with SetMassFromShapes() and yet they seem to behave as if they're center of gravity is off balance. They also behave more light-weight than a single circle shape occupying the same area, and with the same density.
For comparison sake, see the same demo this time using b2CircleDef instead...
http://studio.barliesque.com/temp/NotCompound.swf
Obviously for the sake of this example, circles are the way to go--I'm just working on handling convex hulls in general. By all rights, these two demos should work almost identically--aside from the fact that the compound shapes have flat-faceted sides, not smooth curves like the circle.
Any ideas?
http://studio.barliesque.com/temp/Compound.swf
...the balls bounce extremely oddly, sort of easing into place before bouncing back. Sometimes they'll even overlap!
The mass of each compound shape is set automatically with SetMassFromShapes() and yet they seem to behave as if they're center of gravity is off balance. They also behave more light-weight than a single circle shape occupying the same area, and with the same density.
For comparison sake, see the same demo this time using b2CircleDef instead...
http://studio.barliesque.com/temp/NotCompound.swf
Obviously for the sake of this example, circles are the way to go--I'm just working on handling convex hulls in general. By all rights, these two demos should work almost identically--aside from the fact that the compound shapes have flat-faceted sides, not smooth curves like the circle.
Any ideas?