I wanted to do some real 3d physics for quite some time, but there just weren’t really good actionscript 3 physics engines around. There are 2 real options:
- WOW Physics engine: This is a particle based engine, which means every vertex has it’s own physics properties
- JigLibFlash Physics engine: This is a Rigid Body based engine. You work with primitive types like boxes and speres to create a rough shape of you 3d object. These rigid body based engines are faster than particle based engines, because there’s just one rigid body with physics properties instead of (in case of a simple cube) 8.
There’s quite a lot of examples around built with JigLibFlash and Papervision3D. Because I prefer building my 3D stuff in Away3D, I wanted to create some 3D physics with JigLibFlash and Away3D. Here’s a simple example of how it works:
Just use the arrow keys to move the ball around, try to get it to jump the ramp
. You can download the source code here.
That’s it for now. it takes a lot of time to figure out how everything works because these physics engines are still buggy and undocumented (grrr). The project members of JigLibFlash did a great job by porting this c++ engine to actionscript, but, for an open source project to be successful they better start documenting the source code (I know it’s a boring job) instead of creating demo apps with Papervision, which, in my opinion is not the best 3D engine around.

Nice example Sebastiaan!
[...] > Sebastiaan Holtrop » JigLibFlash physics and Away3D experiment [...]
Thanks dude, saved me a lot of headache.
[...] 目前JigLibFlash支持主流的两种3D引擎,Away3D和Papervision3D, Jiglibflash将物理引擎设计成适配不同3D引擎的物理引擎,只要是能实现它的jiglib.plugin.AbstractPhysics接口,就能作为一个Jiglibflash物理引擎实例来使用,详细情况见这里的说明;该博客发表时,Jiglibflash还没有API文档,博客作者认为目前的这个从C++迁移过来的物理引擎还不够好,bug多,文档少; [...]