mirror of
https://github.com/vrld/HC.git
synced 2024-11-18 12:54:23 +00:00
General purpose collision detection library for the use with LÖVE.
0dc1e6c719
support(A,B, 1,0) returns 0,0 when A and B are touching in a vertex of both A and B AND this vertex is on the right of A's center (in direction (1,0)), e.g. this situation: .---. .-.| B | : A x---' '-' Then: support(A,B, 1,0) = A:support(1,0) - B:support(-1,0) = x - x = 0 Since CircleShape:support(dx,dy) normalizes dx,dy this will result in a division by 0 error in the subsequent execution of the GJK algorithm. An early out with result 'not colliding' (in accordance to the other edge cases) prevents this error. |
||
---|---|---|
class.lua | ||
gjk.lua | ||
init.lua | ||
polygon.lua | ||
README | ||
shapes.lua | ||
spatialhash.lua | ||
vector-light.lua |
General Purpose 2D Collision Detection System Documentation and examples here: http://vrld.github.com/HardonCollider