
JiglibFlash is a great physics engine for the flash platform. Combined with Papervision 3D you can do some amazing stuff. The library has been recently updated and now not only contains a car physics model, but mouse constraints. The mouse contraint can add a new level of interactity to your scene.
I’ve been dying to try it out, and finally after moving house i finally got my lil studio / junk room setup. Below I have created a basic scene in which several block fall from the sky on init. These can then be picked up and thrown, interacting with other objects. Just a finishing touch I Though it would be good to have shadows. The code of which is from the brilliant Andy Zupko (Article on shadow casting). Anyway, I’ve provided the code below with ample commenting.
Collection of jiglibflash examples/tutorials 3d physic engine | JiglibFlash - 3D Physics Engine AS3
July 23rd, 2009 at 3:00 pm
[...] http://www.damonky.co.uk/flex/mouse-constraints-using-jiglib-as3/ [...]
mat
September 21st, 2009 at 8:40 pm
hey, the example looks amazing,
I’m trying to test it and play around with it on my pc, but I keep getting this error,
1137: Incorrect number of arguments. Expected no more than 3.
FlatShadeMaterial = new FlatShadeMaterial(pLight,0×999999,_BOX_COLOR,2);
any ideas?
thanks!
~matt
admin
September 21st, 2009 at 11:28 pm
Hi Matt, I’m glad you like it.
I’ve checked the docs for FlatShadeMaterial and I Cant see any obvious reson why it would error here.
Which version of papervision are you using? I tend to check out from the svn. In any case I have zipped the version of the libraries I used up and uploaded them here.
Give these a try and let me know how you get on.
Dave