Code: Select all
cpVect verts[] = {
cpv(-20,-40),
cpv(-20, 40),
cpv(20, 40),
cpv(20,-40),
};
cpBody* brickBody1 = cpBodyNew(150, cpMomentForPoly(150, 4, verts, cpvzero));
brickBody1->p = cpv(260,100);
cpSpaceAddBody(space, brickBody1);
cpShape * brickShape = cpPolyShapeNew(brickBody1, 4, verts, cpvzero);
brickShape->e = .2;
brickShape->u = .4;
brickShape->collision_type = 2;
brickShape->data = brickSprite;
cpSpaceAddShape(space, brickShape);
Is there another param I should be setting for this? i tried varying the mass and inertia but they don't seem to be doing anything.
Rich