= 30.0f; static const float boxH = 50.0f; static const float mass = 2.5f; cpBody* body = cpBodyNew(mass, cpMomentForBox(mass, boxW, boxH)); cpBodySetPosition(body, ccp(s.width/2, s.height/2)); cpSpaceAddBody(space, body); cpShape* shape = cpBoxShapeNew(body, boxW, boxH); cpShapeSetElasticity(shape, 0.8f); cpShapeSetFriction(shape, 1.0f); cpSpaceAddShape(space, shape); Chipmunk basics - physical objects