Currently I create a b2Fixture like this:
b2PolygonShape spriteShape;
int num = 3;
b2Vec2 verts[] = {
b2Vec2(-29.5f / PTM_RATIO, -49.0f / PTM_RATIO),
b2Vec2(10.0f / PTM_RATIO, -49.0f / PTM_RATIO),
b2Vec2(34.2f / PTM_RATIO, -9.2f / PTM_RATIO),
};
spriteShape.Set(verts, num);
bodyFixture.shape = &spriteShape;
bodyCharacter->CreateFixture(&bodyFixture);
The problem is that on a retina display it seems to double in size, is there a reason for this, and if so how do I make it so that it stays the same size so it doesn’t get messed up on any device?
Thanks!
I faced the same issue as of yours. I have multiplied the content Scale Factor with PTM_RATIO.
You can try the code as below and check it out… It worked for me