I used Physics Editor to define the fixtures, I've included the output for a regular pentagon:
Code: Select all
<key>blocks_ic_polygon</key>
<dict>
<key>anchorpoint</key>
<string>{ 0.50000,0.50000 }</string>
<key>fixtures</key>
<array>
<dict>
<key>mass</key> <real>2</real>
<key>elasticity</key> <real>0</real>
<key>friction</key> <real>2</real>
<key>surface_velocity</key> <string>{ 0.00000,0.00000 }</string>
<key>layers</key> <integer>0</integer>
<key>group</key> <integer>0</integer>
<key>collision_type</key> <integer>0</integer>
<key>isSensor</key> <false/>
<key>fixture_type</key> <string>POLYGON</string>
<key>polygons</key>
<array>
<array>
<string>{ 74.00000,17.00000 }</string>
<string>{ 46.00000,-70.00000 }</string>
<string>{ -46.00000,-70.00000 }</string>
<string>{ -74.00000,17.00000 }</string>
<string>{ 0.00000,71.00000 }</string>
</array>
</array>
</dict>
</array>
</dict>
I am using PEShapeCache_X3_0 to parse the plist file and create the physics bodies.
The left, right and bottom of the screen are lined with non-dynamic physics bodies. Image
The problem is, is that once I get a few of the objects on screen they never come to rest. They have a rotational jitter that never seems to die down. I've set both the Update Rate and SubSteps up to (what I assume are) outrageous numbers to test stability with no joy. (0.1 and 256, respectively) The problem is diminished but not eliminated.
It also occasionally explodes.