I cannot create b2PolygonShape with vertices in my Box2D Cocos2D project. I get no errors, but nothing appears on the screen.
How to get a static body with b2PolygonShape vertices to work?
I would like to use it with a list configured as follows:
b2Vec2 verts[] = {
b2Vec2(-194.5f / PTM_RATIO, 83.0f / PTM_RATIO),
b2Vec2(-118.5f / PTM_RATIO, 65.0f / PTM_RATIO),
b2Vec2(-77.5f / PTM_RATIO, 2.0f / PTM_RATIO),
b2Vec2(3.5f / PTM_RATIO, -59.0f / PTM_RATIO),
b2Vec2(62.5f / PTM_RATIO, -61.0f / PTM_RATIO),
b2Vec2(108.5f / PTM_RATIO, -63.0f / PTM_RATIO),
b2Vec2(138.5f / PTM_RATIO, -41.0f / PTM_RATIO),
b2Vec2(169.5f / PTM_RATIO, 11.0f / PTM_RATIO),
b2Vec2(184.5f / PTM_RATIO, 49.0f / PTM_RATIO),
b2Vec2(218.5f / PTM_RATIO, 51.0f / PTM_RATIO),
b2Vec2(219.5f / PTM_RATIO, -89.0f / PTM_RATIO),
b2Vec2(-174.5f / PTM_RATIO, -88.0f / PTM_RATIO)
};
source
share