0

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.

Kadir
  • 411
  • 1
  • 6
  • 19

1 Answers1

2

It is actually pretty simple:

Body circleBody = PhysicsFactory.createCircleBody(pWorld, pSprite, BodyType.StaticBody, FixtureDef);
JohnEye
  • 6,436
  • 4
  • 41
  • 67
  • Thanks. I was confused with scene.attachChild(); Looks like it is not needed in such case. – Yar Jul 30 '12 at 14:04