0

我可以创建矩形来创建墙,例如:

    final Rectangle wall = new Rectangle(CAMERA_WIDTH-2, 0, 2, CAMERA_HEIGHT -2);
    PhysicsFactory.createBoxBody(this.physicsWorld, wall, BodyType.StaticBody, FIXTURE_DEF);
    scene.attachChild(wall);

但我想创建圈子?例如 ball.it 应该是上面的 box2d 的主体。

4

1 回答 1

2

其实很简单:

Body circleBody = PhysicsFactory.createCircleBody(pWorld, pSprite, BodyType.StaticBody, FixtureDef);
于 2012-04-30T11:52:04.487 回答