Hello, everyone.
When I run the code as follow, exception will happened.
right_vertices[0] = b2Vec2(0.296875, 0.250000);
right_vertices[1] = b2Vec2(0.390625, 0.156250);
right_vertices[2] = b2Vec2(0.390625, -0.156250);
right_vertices[3] = b2Vec2(0.296875, -0.250000);
// right
shape.Set(right_vertices, 4);
b2Fixture* rightFix = body->CreateFixture(&shape);
rightFix->SetFriction(0);
LOG:
Assertion failed: (area > 1.19209290e-7F), function ComputeCentroid, file /ftpserver/04_PROJ/Psy10/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 127.
The exception caused by "b2Assert(area > B2_FLT_EPSILON);"
Why? Isn't the vertices right?
Help me. Thanks.
Sorry for my English.
When I run the code as follow, exception will happened.
Code:
right_vertices[0] = b2Vec2(0.296875, 0.250000);
right_vertices[1] = b2Vec2(0.390625, 0.156250);
right_vertices[2] = b2Vec2(0.390625, -0.156250);
right_vertices[3] = b2Vec2(0.296875, -0.250000);
// right
shape.Set(right_vertices, 4);
b2Fixture* rightFix = body->CreateFixture(&shape);
rightFix->SetFriction(0);
LOG:
Assertion failed: (area > 1.19209290e-7F), function ComputeCentroid, file /ftpserver/04_PROJ/Psy10/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 127.
The exception caused by "b2Assert(area > B2_FLT_EPSILON);"
Why? Isn't the vertices right?
Help me. Thanks.
Sorry for my English.