This is where I create the static body (it's been changed a few times due to errors and attempts to fix this issue)
Code: Select all
body = cpBodyNew(mass, cpMomentForBox(mass, self.contentSize.width, self.contentSize.height));
body->p = location;
body->data = self;
//cpSpaceAddBody(space, body);
shape = cpBoxShapeNew(body, self.contentSize.width, self.contentSize.height);
shape->e = 0;
shape->u = 0;
shape->data = self;
//shape->group = 1;
shape->collision_type = 0;
cpSpaceAddShape(space, shape);
Code: Select all
cpConstraint *josephHandPinJoint = cpPinJointNew(joseph.body, josephHand.body, cpv(114, 107), cpv(0, 0));
cpSpaceAddConstraint(_space, joesphHandPivotJoint);
Thanks. Sorry for the very similar question to others you already have posted.
Kyle