Game Development Community

Why Gjk?

by Erik Madison · in Torque Game Engine · 11/28/2005 (3:43 pm) · 1 replies

After going through most every middleware physics solution, I'm starting to think the best and easiest solution is just to deal with Torques troubles, and add the few missing components that suffice for most physics.
The largest problem I see in the current system, is that we use 3 different collision methods. I've read the whys and wheres in the forums, and I'm really thinking they don't justify the nastiness it's causing.
So, I begin to look at which single method is the best of all worlds, and I'm really coming up on a stumbling block with our use of GJK. Now, I don't know physics other than intense study on the web (not easy at my age). The only major difference I see in GJK, is that it deals primarily in distances between objects. Forgive my ignorance, but why the h*** should I care about that? It seems I am really only concerned with the collision itself, and what to do about it, not how close it is. Rigid derivates are the only things using it, and they are the ones with all the major issues, things like penetrating too far into someone elses space. This is where the distance comes into place I'm guessing; we now have to not only think about what to do about the contact, but also about the degree of penetration. If the punks hadn't penetrated (distance, again) in the first place, the formulas would be something even a Jethro could figure out.
So.... why GJK?

#1
11/28/2005 (7:13 pm)
GJK is great for temporally coherent collision situations because you can cache the results of the previous collision detection pass to very rapidly reject potential collisions.

Of course, we don't cache things... so we kinda take a hit there. But it's still pretty good.

If you're interested in some very good collision detection, I'd strongly suggest checking out Gino van der Bergen's book (He's the G in GJK), as it has a tremendous amount of useful theory on collision detection techniques and the math behind it.

Collision response is of course a seperate issue. :)