Hi,
I'm currently adapting our code to work with 2.0.0, used 1.4.3 before.
I get an assertion on line 224 in b2polygonshape.cpp when creating a b2PolygonShape.
I want it to be a box with certain extents, so I use the SetAsBox method, which seems closest to the behavior of the old b2BoxDef struct. I set the extents to 0.03m and 0.06m just as before and nothing has changed in the definition except for its typename (and that it now gets sent to World::Create).
I see this assertion has something to do with calculating a "core polygon shape" by "shifting edges inward [based on their normal]. But I have no real idea of what the assertion means to me, or how I pass that test (I find the maths a bit hard to follow without comments on what variables are used for etc).
In an unrelated problem, I also have a hard time figuring out in which order I should put vertices for the PolygonShape. I know the documentation states CCW. But I had to define some polyshapes in CW or I got an assert. That was easy to work around though, since I was only making triangles and quads. I figured that it might be because we were using negative Y as up, just like a monitor. The documentation only states "Y is up", but from what I can tell that is equal to "Y is down", as it's just an axis and not real direction. 😉
I'm currently adapting our code to work with 2.0.0, used 1.4.3 before.
I get an assertion on line 224 in b2polygonshape.cpp when creating a b2PolygonShape.
I want it to be a box with certain extents, so I use the SetAsBox method, which seems closest to the behavior of the old b2BoxDef struct. I set the extents to 0.03m and 0.06m just as before and nothing has changed in the definition except for its typename (and that it now gets sent to World::Create).
I see this assertion has something to do with calculating a "core polygon shape" by "shifting edges inward [based on their normal]. But I have no real idea of what the assertion means to me, or how I pass that test (I find the maths a bit hard to follow without comments on what variables are used for etc).
In an unrelated problem, I also have a hard time figuring out in which order I should put vertices for the PolygonShape. I know the documentation states CCW. But I had to define some polyshapes in CW or I got an assert. That was easy to work around though, since I was only making triangles and quads. I figured that it might be because we were using negative Y as up, just like a monitor. The documentation only states "Y is up", but from what I can tell that is equal to "Y is down", as it's just an axis and not real direction. 😉