Translation direction in separating axis theorem
问题 I have implementen the separating axis theorem in java. The collision detection itself works great. But i am stuck when it comes to resolve the collision. my method to get the translation looks like this: public float getOverlap(final Projection other) { float start = m_min > other.m_min ? m_min : other.m_min; float end = m_max < other.m_max ? m_max : other.m_max; float translation = end - start; return translation; } Lets say the projection of the two rectangles in the picture looks like