I finally finished the QuickBox2D documentation. Check it out here.
You can download QuickBox2D and see a few example code snippets on the QuickBox2D page. Should have a tutorial on that page in the next couple of days.
I finally finished the QuickBox2D documentation. Check it out here.
You can download QuickBox2D and see a few example code snippets on the QuickBox2D page. Should have a tutorial on that page in the next couple of days.
This snippet uses my QuickBox2D library to create a chain. QuickBox2D is a wrapper for Box2DFlashAS3 that greatly simplifies world setup, instantiation and graphical skinning of rigid bodies (more info on yesterdays post)...
See the swf here.
Download Box2DFlashAS3 here
Download QuickBox2D Alpha 104 here
See yesterdays post for additional information. I'm still in the process of writing some docs and possibly a tutorial for QuickBox2D... hopefully I'll finish with that soon...
If your somewhat familiar with Box2D and just want to just dig right in, the following scrap of information may help:
// Methods of the QuickBox2D class, used for creating rigid bodies and joints
addCircle();
addBox();
addPoly();
// currently only creates b2DistanceJoints
addJoint();
these function all take one parameter Object as their argument. The common parameter properties for rigid bodies are:
// QuickBox2D simpleRender settings:
lineColor:0x000000
lineAlpha:1
lineThickness:0
fillColor:0xCCCCCC
fillAlpha:1
// wrapped Box2D properties
x:3
y:3
density:1
friction:0.5
restitution:0.2
angle: 0
linearDamping:0
angularDamping:0
isBullet:false,
fixedRotation:false
allowSleep: true
isSleeping:false
// advanced use
maskBits:0xFFFF
categoryBits:1
groupIndex:0
//and the specific param properties are:
addCircle() : radius
addBox() : width, height
addPoly() : verts
//Joints have the following properties... not going to bother explaining these until I write the docs:
addJoint() : a, b, x1, x2, y1, y2