Tuesday, March 24, 2009

Papervision 3D 2 plus APE physics engine integration.

So I've completed the initial Papervision3D + APE integration. I added forces on mouseOver to the sphere so that at the same time that the handler rotates it, it moves it as well. Also, I've set the boundaries of the stage so that the sphere or marble doesn't get off-stage. There is a slight mis-alignment between the Camera 3D perspective and the APE 2D engine because, being 2D the projections of the viewpoint are different, but I can live with that.

To sum it all up this is a Papervision3D Sphere primitive, a static camera, a 2D CircleParticle for the physics engine dummy and the four RecatangleParticles for the 'walls'.

I'm still playing with damping ratios, animation speed and the synchronization of the Papervision 3D spherical rotation and the 2D physics translation & bounces. Also the interactivity is still a little slow but once there are multiple marbles interacting with each other, it going to feel faster. I don't think I'll have more than 6 spheres if it isn't too hard on the CPU.

Next I'll be working on the easing of the rotation so that it synchs with the damping of the translations. I have an idea of how to do this but as it often turns out, it never is as easy as I had originally thought.





I'm also going to try to recreate the way bounces off constraints invert the rotation vector on the sphere.

No comments:

Post a Comment