brainclog wrote:
I am having problems with rotation. They seem to rotate around their upper left corner, while b2PolyShapes rotate around the center. Also, when I set m_rotation on them after they are created it doesn't do anything. Your demos work fine with rotation though so I will have to look into this more.
I am not sure why they are rotating wrong, virtually all the geometry of concave arcs is inherited from b2PolyShape. In any case when you rotate a poly it means you are rotating around the centroid (in 1.4.3. at least). This is usually close to the center of mass and thus fairly useful for polygons. However this is not really the case for concave arcs. I suggest you modify your code to include some translation, in such as way as to rotate around the center of mass.
Again, I'm not sure what the problem with m_rotation is? Bear in mind that you cannot set m_rotation directly, you have to use SetOriginPosition/SetCenterPosition, I think. Try swapping which one of those you are using, too. I never managed to understand the distinction between these, so it wouldn't be surprising if they don't behave exactly as they would for a polygon.
I don't have time to test this just now, but I think you can quickly swap concave arcs with their bounding poly by setting the type property in b2ConcaveArcDef to
b2Shape.b2polyShape. You should try that, and see if you are getting the same problems.