Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

1 Answer 1

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.