I’m trying to save a scene and re-load it using Box2D on iOS but the problem I’m having is that after reading the scene from file the polygons don’t collide properly. It’s a sort or half collision, as if the polygons were concave. They do however render correctly with GLESDebugDraw. I read the vertices of the polygon in in the same order they are written, which is the same order they are stored. Any ideas as to what’s going on would be useful at this point. Thanks.
Share
I worked out what it was. Turns out I wasn’t saving/reading the normals for the edges. I thought it would generate the normals from the vertices on construction of the b2body. Apparently not.