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

Is there a way to do it? I can get only polygon_shape's vertices, but i want circle, box, etc too.

How to do it?

share|improve this question
up vote 6 down vote accepted

There's no such thing as a box in in Box2D (ironically). The SetAsBox method is a convenience function that creates a 4-ary polygon.

A circle does not have vertices, so you cannot get a list of them. A circle is defined by its radius and its position, and those are both accessible.

Edge and loop shapes use the same vertex storage as a polygon.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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