#include "AABB.h"
#include "Collision.h"
+#include "../graphics/const.h"
namespace orbi {
if (sdiff.x < sdiff.y) {
coll.pos.y = diff.Center().y;
coll.norm.y = 0;
- coll.depth.y = 0;
+ coll.depth.y = sdiff.y * sigma(Center().y - other.Center().y);
if (Center().x < other.Center().x) {
coll.pos.x = Right();
coll.norm.x = -1;
coll.pos.x = diff.Center().x;
coll.norm.x = 0;
coll.depth.x = 0;
+ coll.depth.x = sdiff.x * sigma(Center().x - other.Center().x);
if (Center().y < other.Center().y) {
coll.pos.y = Bottom();
coll.norm.y = -1;