Box2d: Assertion failed: (area > 1.19209290e-7F), function ComputeCentroid

来源:互联网 发布:全球云计算大会 2016 编辑:程序博客网 时间:2024/04/28 02:50

http://stackoverflow.com/questions/14084255/box2d-concave-body


Solution:

In your case vertices are oriented clockwise, while b2Polygon requirement is counterclockwise. It leads to calculation of negative area of the polygon. You have to change order of your vertices.

0 0