Sometimes game crashes while colliding with circle block. Console returns "toPolygon() is not a function" in Hit.js:
testPolyCollision(type, hit1, hit2) {
let collided = false;
switch (type) {
case 'box':
collided = sat_1.default.testPolygonPolygon(hit1.toPolygon(), hit2.toPolygon());
break;
case 'circle':
collided = sat_1.default.testPolygonCircle(hit1.toPolygon(), hit2);
break;
case 'polygon':
collided = sat_1.default.testPolygonPolygon(hit1, hit2.toPolygon());
break;
}
return collided;
}
Ps: side question to not open a new thread. I would like to know if you could (and are going to) optimize somehow big map lag in the closest future? Once again, i'm not pushing, i just want to know if there is a point to make larger maps 😉