I am trying to build a simple scene by having two round objects. one of the objects is positioned over and slightly offsetted to the side of the other object.
the scene has a static segment shape on the ground.
what i want to happen, is to have the round objects reacting like a table tennis ball, bouncing back quite significant and bounce of of each other, but they don't, the just fall down and slide over the floor.
the shapes of the round objects are created with:
Code: Select all
cpBody *body=cpBodyNew(1.0,cpMomentForCircle(1.0,0.0,12.0,cpv(0,0)));
body->p=cpv(posx,posy);
cpSpaceAddBody(space,body);
cpShape *shape=cpCircleShapeNew(body,12.0,cpv(0,0));
shape->e=0.6; shape->u=0.5;
cpScpaeAddShape(space, shape);
Code: Select all
cpBody *body=cpBodyNew(INFINITY, INFINITY);
cpShape *shape=cpSegmentShapeNew(body, cpv(0,0),cpv(1280,0), 10);
shape->e=0.6; shape->u=0.5;
cpSpaceAddStaticShape(space, shape);
what am i missing?