by bruce343434 · 2y ago · 0 comments
- only 2d is considered
- edge cases are handwaved/not treated/rest-of-the-fucking-owl'ed
- edge cases are not even mentioned
- abstract mathematical operation is used, whose implementation (which isn't always obvious) is not given or described
- ok, hit or no hit... but then how to get the actual collision manifold? In which direction should the objects be separated and by how much?
- numerical accuracy is not regarded
- unnecessary muddying of the concepts by using OOP - just use (math) vectors and matrices please
Reason that most 3D collision is simply handled with approximate spheres or cubes around objects, or else floating planes. IE: Feature-based Algorithms
Advanced stuff, if you want to implement it: Simplex Based Algorithms, Image-Space Occlusion Culling Algorithms, Bounding Volume Hierarchies.
Collision Detection: A Survey, S. Kockara et al, 2007 IEEE International Conference on Systems, Man and Cybernetics. https://d1wqtxts1xzle7.cloudfront.net/50445336/Collision_det...
3D Collision Detection: A Survey, P. Jimenez et al, Institute de Robotica, 2001, https://digital.csic.es/bitstream/10261/30526/1/doc1.pdf
"GJK was generalized to be applied to arbitrary convex point sets, not just to polyhedra. [It] operates on the Minkowski difference between the objects. Two convex objects collide if and only if their Minkowski difference contains the origin."
Link is Access Denied btw, but sci-hub works.
I guess that's because the concepts transfer nicely from 2d to 3d. E.g. the math for circle/circle collision is basically the same as the one for sphere/sphere collision.
(tbh it's been 20 years since I did that by hand ... but I would assume that the underlying math has not changed since then)
If I'm only doing 2D (and that is about all I have done) I don't really want/need a general collision framework. Code to detect rectangle collisions, circle-circle collisions, convex polygon collisions is fairly small and tight. Even the polygon collision code uses only simple linear algebra (dot products and such).
To your last point, because I own the code, I can guarantee no OOP ... I just use math.