3

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?

doppelgreener
  • 7,184
  • 7
  • 42
  • 68
lacas
  • 346
  • 3
  • 14

1 Answers1

6

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.