I am currently immersed in a three.js project that involves selecting two boxes from a board and drawing a straight line to connect them. Once this is done, the goal is to highlight all the boxes that the line intersects. My main challenge at the moment is figuring out how to identify which boxes the line crosses paths with.
Any assistance on this matter would be greatly appreciated - whether it be a code snippet, relevant links, recommended reading material, or mathematical formulas.