Hot answers tagged hexagon
1
I don't think there is an easy way to calculate the collision of polygons with more sides than a rectangle. I would break it down into primitive shapes like lines and squares:
function objectsWillCollide(object1,object2) {
var lineA, lineB, lineC, lineD;
//get projected paths of objects and store them in the 'line' variables
var AC = ...
Only top voted, non community-wiki answers of a minimum length are eligible