Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make a physics body like this image.

The red color ellipse will be the physics body and the curved antenna shapes will not included in the physics body.

I want to know how to call the function to create it. Like:

body = PhysicsFactory.createBoxBody(physicsWorld, this, BodyType.DynamicBody, objectFixtureDef);
share|improve this question

closed as too localized by Le Comte du Merde-fou, Byte56, bummzack, Trevor Powell, API-Beast Mar 16 '13 at 0:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Why exactly are you calling "createBoxBody" and trying to make an ellipse? – Shotgun Ninja Mar 11 '13 at 18:16
Also, take a look at this:… – Shotgun Ninja Mar 11 '13 at 18:17
Not exactly "createBoxBody", I mean if there something like it. For example there is "createCircleBody" method. – prium Mar 11 '13 at 19:11
Please read the documentation for your "PhysicsFactory". Voting to close as too localized. – Le Comte du Merde-fou Mar 13 '13 at 9:11
up vote 1 down vote accepted

You have to use Physics Editor for this purpose. If you don't know anything about it then get proper information about it.

Following link gives you direct link to download Physics Editor

Physics Editor generate xml file and many other format that you want. You have to add sprite and create vertex that you want available in the body. Then generate a file that contain information about the body that you want to create. So that you have to only parse that information and provide as argument to polygon shape.

share|improve this answer
Is there no way to create something like it with "PhysicsFactory"? – prium Mar 11 '13 at 19:16
You can use PhysicsFactory.createPolygonBody() method for this purpose and provide list data that you read from the file. – Siddharth Mar 12 '13 at 16:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.