Today I finished my implementation of GJK, and now it works in 3D.
In the pictues there are 4 white objects and a textured sphere. The white objects are emitting light only if they are colliding with the textured sphere, so the big right cube is the only one who is not lighting the scene.
However a major problem is still there: collisions between boxes and spheres are not correct, while box-box and sphere-sphere collisions are.
This is surprising, because I wrote the algorithm from scratch, while following a different source to check if I was not missing something...but even if the code is completly different, the problem remains...
I'm starting to think that the problem doesn't lie in the algorithm, but I'm also positive that the support functions I wrote are correct as well, so I'm not really sure on how to proceed.
Tomorrow I'll probably add a GenericConvexCollider, and see if it behave correctly.

Nessun commento:
Posta un commento