reversed direction of aabb-aabb collision solver terms
parent
5185f5062b
commit
41f84bb52c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue