Flixel Forums

development => releases => Topic started by: yadurajiv on Tue, Jun 5, 2012

Title: Drawing concave shapes with Box2D in Flixel-Flash
Post by: yadurajiv on Tue, Jun 5, 2012
Today someone asked me if I could share the code for some box2D flixel experiments I did some time ago, so I did. I thought this might help others here too, so I'm posting it here. The code is *not* bug free nor is it commented that well, but it won't be too hard to read through. The box2D FlxSprite and FlxTileBlock implementation for Flixel is more or less the same as the flashgamedojo tutorial. The polygon class and the box2d polygon class is what is new.

Drawing shapes with Box2D in Flixel

(http://tardis1.tinygrab.com/grabs/18b708d926a763f2e42786e60e5b6acfb2a4ff0ba1.png)

Drawing shapes with Box2D in Flash

(http://tardis1.tinygrab.com/grabs/18b708d926be3e5c2af2c392c79d42496566cc2c7c.png)

samples and code: http://rant.yadurajiv.com/yadurajiv/2011/01/694 (http://rant.yadurajiv.com/yadurajiv/2011/01/694)