As I mentioned previously, Box2DFlash 2.1 is quite different from previous versions of Box2DFlash.

The major differences that I have found so far, are related to how to setup your world and your bodies (bearing in mind that I have only just started with Box2DFlash, and do not know the previous versions).

It took me a while to get my head around the Box2DFlash 2.1 relationship between fixtures, shapes, and bodies.

So here is a simple graphic that I have created, showing the relationship between a b2Body (your body), a b2BodyDef (body definition, holding information like angle, userData, position, etc), a b2FixtureDef (fixture definition holding information about the physics of the object, i.e. friction, restitution, density, and shape, etc), and a b2PolygonShape (if you are using polygons, and this holds information about the actual shape of your body).

This is to be considered a work in progress, and as I continue with Box2DFlash I may change this.

But for now use it as a good approximation and aide memoire.

Box2DFlash body overview

Box2DFlash body overview

Did you like this? Share it:

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
   

Google Adwords

© 2011 The Highlander Blog Suffusion theme by Sayontan Sinha