Hi, I've been playing around with Box2D on MSVC 2010 and I'm having a problem with the CreateFixture function, it won't accept a b2PolygonShape as it's first parameter.I went through some troubleshooting, checked the source code of the function, I know that it is defined as constant so that it doesn't alter the original object.Here's the code, same as is the HelloWorld example:
Code:
//BodyGround definition
b2BodyDef GroundBodyDef;
GroundBodyDef.position.Set(0.0f,-10.0f);
//Creating our body
b2Body *groundBody = world.CreateBody(&GroundBodyDef);
//Creating polygon
b2PolygonShape groundBox;
groundBox.SetAsBox(50.0f,10.0f);
groundBody->CreateFixture(&groundBox,0.0f);
Thanks in advance.