Over the past 2 months the JigLibFlash team has been re-architecting the whole JigLibFlash project and the new version is now available. Using this re-architected library is quite a bit different from the old version. So before I convert some of my older stuff over, I decided to making a new demo of the updated library in action.
In this demo randomly positioned and oriented video game cases drop one on top of the other until 7 cases are on the screen. Then it resets and starts all over again. It is a very simple example, but it will give you a place to start.
To play the demo click here.
To get the source click here.
Source Requirements: You will need Papervision3D , JigLibFlash and bulk-loader to compile the source.
Note: The case is a scan of my copy of ‘Left 4 Dead’, if you want to read a good article on how the actual case artwork came to be, check out this link: http://www.l4d.com/blog/post.php?id=2353
3 Responses to "JigLibFlash Rewrite – Video Game Case Physics Example"
Hello, I am new to JigLibFlash.
I have a question about rotation of the RigidBody. I am trying to set the rotationX, Y and Z of a RigidBody as same as a 3d object in PV3D (without assign physics on it). But, I find the result is the RigidBody cannot follow the rotation from the object in PV3D.
However, when I set only one rotation either X or Y or Z, it works, the RigidBody in JigLib can follow the one axis of rotation from a 3d object in PV3D.
Is there any methods can solve this problem?
Hi Sze
The reason for this issue mainly boils down to how rotations are done in Papervision3D and JigLibFlash. In Papervision3D rotations are only applied on next frame. So for example if you changed rotationX and rotationY, these would both be changed at the same time. While in JigLibFlash the rotations are set each time they are changed. So if you change rotationX, when you change rotationY this will be applied to the rotational matrix with the new rotationX already applied. So to get these closer to the same you will need Papervision3D to update it’s rotational matrix every time a rotation is set. Off the top of my head I don’t know the easiest way to do this, but hopefully this points you in the right direction.