   3D Penetrations of Rigid Bodies
  I am in the process of getting a 3D package developed in flash and the development team is having some issues.  We are trying to detect static penetrations between boxes, cylinders and planes.  We are trying to find the penetration vector to move these objects back to touching.  The team has been trying to implement the JigLib physics engine and I am not sure that it is the right tool for the job.Can anyone suggest the best way to solve this problem with JibLib or any other tool or algorithm?   
  The seperating axis theorem (SAT) is a good choice for this and will give you want.Also the Minkowski Portal Refinement (MPR) algorithm is good for this.SAT i hear is good for if you want to make bounding volumes for your objects (ie a character has a bounding box around him that is what it used for collision detection) while MPR is good for if you want to use complex geometry for collision detection (such as the actual poly's of your model).The reason being, SAT is fast but the more polys your objects have, it grows computation exponentiallyCheck out those guys, and if you know whats good for you, get a couple coppies of this book for your team!http://www.amazon.com/Real-Time-Collision-Detection-Interactive-Technology/dp/1558607323/ref=sr_1_1?ie=UTF8&s=books&qid=1271800041&sr=8-1(:   ;  Great demonstration: http://www.metanetsoftware.com/technique/tutorialA.html;  Cylinders will be a major PITA. They are not nice to deal with, unless you use a library such as GJK or the MPR (that can deal with any type of convex objects).MrRowl (JigLib) is a member on these forums, although I haven't seen him in a while. The easiest will be sphere, boxes, and triangles. There are plenty of info for those, spheres being the most straight forward. You just need a 'closest point' function (for triangles, boxes, ect...). For boxes, pyramids, triangles, the SAT will cover them. For these, you can also implement the swept test relatively easily.   