通过box2d在android andengine中创建圈子?
例如,我可以创建用于创建墙的矩形:
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的body,就像上面那样。
它其实很简单:
Body circleBody = PhysicsFactory.createCircleBody(pWorld, pSprite, BodyType.StaticBody, FixtureDef);
链接地址: http://www.djcxy.com/p/68949.html