我怎样才能在chupmunk我的代码更新空间是:花栗鼠:如何更新形状?
// left
shape1 = cpSegmentShapeNew(edge, cpvzero, cpv(0.0f, size.height), 0.0f);
shape1->u = 0.1f; // minimal friction on the ground
shape1->e = 0.7f;
cpSpaceAddStaticShape(_space, shape1); // a body can be represented by multiple shapes
// top
shape2 = cpSegmentShapeNew(edge, cpvzero, cpv(size.width, 0.0f), 0.0f);
shape2->u = 0.1f;
shape2->e = 0.7f;
cpSpaceAddStaticShape(_space, shape2);
// right
shape3 = cpSegmentShapeNew(edge, cpv(size.width, 0.0f), cpv(size.width, size.height), 0.0f);
shape3->u = 0.1f;
shape3->e = 0.7f;
cpSpaceAddStaticShape(_space, shape3);
// bottom
shape4 = cpSegmentShapeNew(edge, cpv(0.0f, size.height), cpv(size.width, size.height), 0.0f);
shape4->u = 0.1f;
shape4->e = 0.7f;
cpSpaceAddStaticShape(_space, shape4);
如果球碰底形状这样球上去但底部形状删除,并显示希望我做的绿线,但我不知道如何从身体中去除形状。任何人的建议,欢迎。
这是一个答案。这可能奏效了,但没有解释它是什么,它根本就不是一个好答案。包含解释时将删除-1。 – Popeye