Creating circle in android andengine by box2d?

I can create rectangle for creating wall for example:

    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);

But i wanna create circle? for example ball.it should be body of box2d like above.


它其实很简单:

Body circleBody = PhysicsFactory.createCircleBody(pWorld, pSprite, BodyType.StaticBody, FixtureDef);
链接地址: http://www.djcxy.com/p/68950.html

上一篇: 如何绘制一个透明中间的圆

下一篇: 通过box2d在android andengine中创建圈子?