Home | Contact Us | Store

Revolute Joint Box2D Physics Animation: Add Bodies

Joints in the Box2D Actionscript Physics animation are used to constrain bodies to the world or to each other. We discuss how to create Revolute Joints in very details in this series of box2d physics simulation.

Box2D physics animation of Revolute Joint example display here.
bodyDef = new b2BodyDef()
bodyDef.position.Set
boxDef = new b2PolygonDef()

Flash Physics Simulation Revolute Joint Tutorial Content

A revolute joint in Box2D Physics simulation forces two bodies to share a common anchor point, often called a hinge point. To specify a revolute joint you need to provide two bodies and a single anchor point in world space. The initialization function assumes that the bodies are already in the correct position.

STEP 1: Add Bodies to Stage and Keep Static
Since the initialization function of Box2D assumes that the bodies are already in the correct position , the first step is to add bodies on the stage to make sure that they are in correct position. This is best to keep all bodies in static for easy position analysis.

Flash ActionScript Codes:

Almost all flash source codes on this website are free to download. In order to maintain our website, which includes the developement and maintenance of tutorials, we would appreciate your kind contribution by buying some source files at very small fee. Once we get reasonable amount of incentives from contribution or Advertisement sponsors, the source codes will be released for free to download.

Download Flash Source File:

Flash Source File Awaiting to be released.

Remarks:

This Box2D physics animation shows how to create revolute joints. Step 1: add bodies to the physics world.

Box2D Revolute Joint Physics Animation