GJK/EPA and hollow shapes
Posted: Mon Apr 14, 2014 11:17 pm
Is there a way to leverage GJK or EPA for hollow shapes?
Imagine this case: You want to keep the red triangle inside the black square. In the case in the picture you'd want there to be no collision. But vertex A is *almost* touching the edge, so the distance/separating vector should be pretty small.
EPA would return the separating vector from B to the left edge of the square, which is almost what I want but not quite. I'm guessing there's probably something like a modification of EPA that would give the right answer?
Imagine this case: You want to keep the red triangle inside the black square. In the case in the picture you'd want there to be no collision. But vertex A is *almost* touching the edge, so the distance/separating vector should be pretty small.
EPA would return the separating vector from B to the left edge of the square, which is almost what I want but not quite. I'm guessing there's probably something like a modification of EPA that would give the right answer?