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 bminy = b->physics.aabb.y + b->sprite.y;
|
||||||
float bmaxy = bminy + b->physics.aabb.h;
|
float bmaxy = bminy + b->physics.aabb.h;
|
||||||
|
|
||||||
float right = amaxx - bminx;
|
float right = bmaxx - aminx;
|
||||||
float left = aminx - bmaxx;
|
float left = bminx - amaxx;
|
||||||
float top = aminy - bmaxy;
|
float top = bminy - amaxy;
|
||||||
float bottom = amaxy - bminy;
|
float bottom = bmaxy - aminy;
|
||||||
|
|
||||||
float ret = right;
|
float ret = right;
|
||||||
*out_px = right;
|
*out_px = right;
|
||||||
|
|
Loading…
Reference in New Issue