NSMutableArray *sumPositionArray;
sumPositionArray = [[NSMutableArray alloc] init];
for (int i = 0; i < 10; i++)
{
b2Body *currentBody = (b2Body*)[[bodies objectAtIndex:i] pointerValue];
b2Vec2 innerPosition=innerCircleBody->GetPosition();
float theta = deltaAngle*i;
float x = radius*cosf(theta);
float y = radius*sinf(theta);
b2Vec2 circlePosition = b2Vec2(x/PTM_RATIO, y/PTM_RATIO);
b2Vec2 sumPosition=innerPosition+circlePosition;
b2Vec2 impulse = b2Vec2(0,0);
b2Vec2 sumposition=innerPosition+circlePosition;
[sumPositionArray addObject:[NSValue valueWithPointer:sumPosition]];
}
我收到一条错误消息: 没有从 b2vec2 到 'const void *' 的可行转换