ignore linear impulse if bodies are separating
This commit is contained in:
@@ -42,6 +42,9 @@ class PolygonalHull:
|
||||
def project(self, axis: pg.Vector2) -> tuple[float, float]:
|
||||
projections = [v.dot(axis) for v in self._vertices]
|
||||
return (min(projections), max(projections))
|
||||
|
||||
def closest_vertex(self, v: pg.Vector2) -> pg.Vector2:
|
||||
return min(self._vertices, key=lambda p: (v-p).length())
|
||||
|
||||
|
||||
class BaseCollider(ABC):
|
||||
|
||||
Reference in New Issue
Block a user