cgl icon indicating copy to clipboard operation
cgl copied to clipboard

Bug: SAT collision detection fails on certain edge cases

Open Jaysmito101 opened this issue 1 year ago • 0 comments

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);

Jaysmito101 avatar Feb 11 '23 18:02 Jaysmito101