I am creating project with different shapes using box2d.. i created a square using the following code.`b2BodyDef bodyDef;
bodyDef.type = b2_dynamicBody;
bodyDef.position.Set(screenSize.width/2/PTM_RATIO,50/PTM_RATIO);
bodyDef.userData = sprite;
_sqrBody = world->CreateBody(&bodyDef);
// Define another box shape for our dynamic body.
b2PolygonShape dynamicBox;
dynamicBox.SetAsBox(.5f, .5f);//These are mid points for our 1m box
// Define the dynamic body fixture.
b2FixtureDef fixtureDef;
fixtureDef.shape = &dynamicBox;
fixtureDef.density = 10.0f;
fixtureDef.friction = 0.4f;
fixtureDef.restitution = 0.1f;
_sqrFixture = _sqrBody->CreateFixture(&fixtureDef);`
i want to move this object.How can i move..any code in “cctouches”.Thanks in advance..
you can give a custom position in myposition