ActionScript 3 Rigid Body Physics Engine
September 8th, 2007
I started work on a 2D rigid body physics engine that I’ll be releasing as open-source. There are a few AS3 physics engines out there- Fisix, APE, the unreleased Motor… and while I’m sure this will fill a few holes, I’m most interested in it being a resource for developers wanting to simulate physics, as I’ve had trouble finding a comprehensive source of the hows and whys.
Here’s a demo. Use left and right arrow keys to spin the wheel. You can grab the movable objects and toss them, too.

As it gets further into development I’ll write some tutorials to explain some of the engine’s inner-workings etc.
Current Features:
- Rigid body simulation
- Arbitrary convex polygons
- Circles
- Cubic Bezier curves
- Lines
- Constraints
- Springs
- Bungees
- Easily swappable numerical integrators
- RK4
- Euler
- Midpoint
- Separation Axis Theorem based collision detection
- Modular force generation
Next up is splitting collision detection into coarse and fine phases via spatial partitioning.
Oh- and I’m calling it FOAM.
when are you gonna get to work on soft bodies?
i want to see ropes and cloth and flags flapping in the wind!
just kidding. this rocks!
When will you be releasing source code?
It’s currently in a transitional period- I hope to have an alpha released within the next 5 weeks. What I’m hoping to do really kind of makes or breaks the project in my opinion, but I’ll release it all the same.
a tutorial please!!!
Can you provide the source for this one?