1

Did I implement the various formulas correctly? No. A normal should be a single direction vector with one x value and one y value, not a line segment joining two points. Point projection where you divide by slope will behave badly for horizontal lines where the slope goes to zero. Your overlap test checks only one side of one polygon. How should I "...


1

When I remove the Game.drawLines(), the circles don't have the border around them anymore. Well, let's do the obvious thing and look at that function then. static drawLines() { ctx.strokeStyle = "#000000"; for(let i = 0; i < 5; i++) { ctx.moveTo(0, i * (canvas.width / 50) + 50); ctx.lineTo(canvas.width, i * (canvas.width / ...


Only top voted, non community-wiki answers of a minimum length are eligible