cgl
cgl copied to clipboard
Bug: SAT collision detection fails on certain edge cases
As the title suggests the SAT collision tests fails on certain close cases specially if the difference of size of 2 polygons is big.
Relevant functions:
bool CGL_sat_collision_overlap_on_axis(CGL_shape* a, CGL_shape* b, CGL_vec2 axis, float* overlap_amount);
bool CGL_sat_collision_detect(CGL_shape* a, CGL_shape* b, CGL_vec2* n_vector);
void CGL_sat_collision_calculate_axes(CGL_shape* shape, CGL_vec2* axes, CGL_int* axes_count);