reversed direction of aabb-aabb collision solver terms

pull/17/head
Sara 2023-07-16 21:32:33 +02:00
parent 5185f5062b
commit 41f84bb52c
1 changed files with 4 additions and 4 deletions

View File

@ -156,10 +156,10 @@ float _solve_aabb_aabb(const object_t* a, const object_t* b, float* out_px, floa
float bminy = b->physics.aabb.y + b->sprite.y;
float bmaxy = bminy + b->physics.aabb.h;
float right = amaxx - bminx;
float left = aminx - bmaxx;
float top = aminy - bmaxy;
float bottom = amaxy - bminy;
float right = bmaxx - aminx;
float left = bminx - amaxx;
float top = bminy - amaxy;
float bottom = bmaxy - aminy;
float ret = right;
*out_px = right;