Today I decided to implement something I wanted to add AFTER making the GJK work.
But since I've been stuck on it for more than a week, I decided to implement this now, because it could also help to debug the GJK.
I'm talking about arbitrary convex mesh colliders.
To do so I added a function to the MeshManager class to load simplified models, beacause the only interesting property is the position of a vertex.
Then I created a ConvexCollider class with the relative support function, and did a general refactoring on the other colliders as well.
I tried to load a cube mesh to see if the behaviour is the same as the AABB collider.
Here is what I observed:
1) AABB-Convex -> works
2) Convex-Convex -> works
3) Convex-Sphere -> Exactly as AABB-Sphere there are false positives....however they occurs in a way slightly different than before, so the bug I'm struggling to find behaves differently depending on how the AABB is implemented, as AABB or as a convex cube.
Except for the last point, which is not what should happen so it doesn't really count, I would say that the AABB and ConvexCube are functionally identical, and other meshes should work as well (not tried yet).

Nessun commento:
Posta un commento