3 ms·
I've implemented GJK after watching Casey Muratori's video on the subject. It was surprisingly straightforward and I was able to bang it out in a day or two for
by mbStavola 4y ago
I've implemented GJK after watching Casey Muratori's video on the subject. It was surprisingly straightforward and I was able to bang it out in a day or two for the game I was working on a few years ago.
But GJK only gives you part of the story. The fun bit comes after with EPA[2], which gives you more actionable information for your collision detection routines. It took me a bit longer to grok EPA than it did GJK; I probably spent a week or so fixing bugs and handling edge-cases before I had something that worked consistently. However, the fact that you can just use the last simplex you calculated from GJK to continue with EPA was a very nice property to have.
[1]: https://youtu.be/Qupqu1xe7Io https://youtu.be/Qupqu1xe7Io
[2]: https://dyn4j.org/2010/05/epa-expanding-polytope-algorithm/ https://dyn4j.org/2010/05/epa-expanding-polytope-algorithm/