Getting a circle radius from a body, always get 0.1?

I'm trying to access the radius from a body, the closest I've got is this:

Code: Select all


var asteroidShape:b2CircleShape = b.GetFixtureList().GetShape() as b2CircleShape;
trace("rad: " +asteroidShape.GetRadius());



It always outputs 0.1, regardless of the size of the actual shape. Any ideas what I'm doing wrong?

Thanks!
Does it collide as if it has only 0.1 radius or does it actually collide with its actual non-0.1 radius?

Also, is the circle the only fixture in that body? Double-check if you have more than one body.CreateFixture() calls.

Last thing to check, make sure you set the radius in the b2CircleShape before you call body.CreateFixture().

Original thread: https://box2d.org/forum/viewtopic.php?t=8703