I am making a computer game and I need to know how a line can intersect with a cube.
The line is drawn with a set distance,end,start point.
The cube has a known center point and height,width,depth.
I need the maths of this so I can see how I can program this into the game.
It is a 3D world but assume the height is a constant.