Open WaneOshin opened 1 year ago
Hi!
Its been a long time since I've worked on this, but there may be two reasons:
Its probably (1). I havent measured the two in a very long time, but I will ask if its worth the trouble of adding GJK and EPA. If you only need to worry about simple shapes like boxes and triangles then the code complexity of GJK/EPA may now be worth the tiny speedup (if there is one). SAT works fine and its a single function you get both collision and collision info from, while GJK needs EPA for you to be able to solve the collision. Sometimes the complexity added to a system isnt worth the benefit
If I were to add arbitrary shape support then GJK would be necessary since checking all the faces of an n-gon is ridiculous. Usually physics engines solve different shape combos in their own optimized way. You could use SAT for 2 AABBs and GJK for an AABB and a convex shape. For spheres, just do the radius and center test.
thank you, this answered my question
Hello there! simple question im struggling to find the answer: why use SAT instead of gjk/epa? isnt SAT slower? does gjk/epa have problems? thanks , nice project btw