My friends and family are under attack in Ukraine. Donate to protect them directly or help international organizations.

PaperVision3D and JigLib

August 31st, 2009

I experiemented with PaperVision3D and JigLib last week. Since JigLib had a plugin specifically designed for PaperVision3D, making the two work together was a breeze. The only thing that really bothered me is the fact that when I applied a force on a body, it rolled instead of gliding smoothly along the surface. I'm used to 2D physics engines, so that was unexpected for me.

I found that the documentation for JigLib was pretty limited. There is only an API without any explanation as to what the methods do and a few tutorials. Oh yes, and my physics knowledge is limited, so many terms don't mean much to me.

I spent sleepless nights in the source code, trying to figure out what everything does by myself (since nobody answered my e-mails). I stumbled upon a very nice class named "JConfig". This was the jackpot. It had a nice property "limitAngVelocities", which was set to 10. I set it to 0 and voilà! My objects glided nicely along the surface, colliding with each other, maintaining their initial rotation.

I hope that this will save some sleepless nights to others.

Previous: doctrine:insert-sql for MAMP users Next: When garbage collection does more than you want