The algorithm works even when the shapes are rotated. When there are several candidates that all give the same distance, only two points are chosen, as can be seen in the first image. When the objects are intersecting, no line is drawn.
We still haven't drawn polygons other than squares to test our algorithm with. However, we tried it with Unity's built in pill shape and we accidentally found out that our algorithm works even for rounded shapes.
GJK 4 life
Inga kommentarer:
Skicka en kommentar