« SebCoverFlow 2.2.1 available
» Flex 3 localisation

Actionscript 3, Away3D, JigLibFlash, Physics

JigLibFlash physics and Away3D experiment

04.09.09 | 4 Comments

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:

JigLibFlash and Away3D experiment

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.

4 Comments

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« SebCoverFlow 2.2.1 available
» Flex 3 localisation