Trying to implement proper capsule-convex polyhedron collisions, so that the player's head doesn't end up inside other objects. It almost works, but there are a few literal edge cases I'm missing 😅

@lisyarus what method are you using for collision since you moved from GJK?

I was recently doing a character controller collision, for capsule just doing tri capsule collisions with BVH works well for what I needed.

Closest point on line segment of the capsule to the triangle edges and the point on triangle plane and then checking the distance against capsule size.

and then some soa SIMD to do more tris at once :)

@polymonster Just brute-force iterating over all vertices, edges and faces of a potential collider and finding the smallest separation vector! This works for a sphere (the code is almost the same as just for a point), but it's trickier for a capsule (which is really just an inflated line segment).