Hi! I was wondering if there is a better way for finding the contact points in 2D when using SAT. Here's what i currently use:

Find the two objects positions pos1New and pos2New that represent the positions when the two objects are just touching and are about to collide if moved further. Find the minimum translation vector, let it be vectMTD.

Take polygon1 in position pos1New and find the minimum of projecting it's vertices onto vectMTD. Also store the points that cause this minimum projection measure int list L1.

Build a separating plane using vectMTD and one of these points detected. Now build a second list(L2) of points that lie on this plane but correspond to polygon2 in position pos2New.

If
one of the lists has 1 point an the other two then we have vertex-edge case, if both have one point then we have vertex-vertex case.

If both lists have two points than we have edge-edge case. We calculate a new plane along the edge of the polygons using a normal perpendicular to vectMTD and located in the origin. Next the for points are sorted based on their distance to the plane. The second and third point define the line of collision.

Are there any flaws with this approach?