mayobutter wrote:
update: The Alchemy Port is now up to date with r116 of Box2d, which includes the new b2EdgeShape and b2LoopShape! There may be bugs in this version, so proceed with caution. See the TestBed for example usage of edges + loops.
thanks for the update: you asked for feedback and testing, here we go:
currently i had only the time to play around with the edge shapes. sometimes they work great, sometimes they crash. i build two small tests to show, the problems:
http://www.swfcabin.com/open/1278655980in both tests there are only two edge shapes, a poly (as box) and a circle. the upcoming coordinates are all divided by a scale value, but these numbers are much easier to handle:
the first test:
two edge chains, the left one flat, the right one slightly goes down. vertex 3 of the left shape ist vertex 2 of the right shape. vertex 0 of the right shape is vertex 1 of the left shape. the left one has no vertex 0, the right one no vertex 3. i think this should be the right usage of edge chains? seems to work really good, no crashed etc. the only strange thing is when you grab the circle or the box. try to push them trough the left edge. this will not work (as intended). but when you try to push the box through the right edge from the right side there is no collision. even after dragging it out and in again, the collision is gone. i think you have to drag the object out of the edge's bb the reactivate collisions.
the second test:
sam as test 1, but two modifications: first, the right edge not going down anymore. this is a scenaria which can happen in tiled levels. sliding across the edges works great here (box and poly!). the second change is that i added a vertex0 on the left shape. the circle has no problems at the edge, but the poly causes the alchemy part to crash (i think you mentioned this before?). i started altering the values. the crash will only occur if the y value of vertex 0 and vertex 1 are equal. if the y value of vertex 0 differs, it's working, but then sometimes there's no collision (like the right edge in ex. 1)
i hope this helps somehow. if you know what to do, you can build workarounds atm
😉there are three minor issues in the current version:
in b2Fixture, line 262, the function m_proxyId has no return type
same in b2World, line 300 (function ClearForces)
finally, e_clearForces in b2World has no type declaration