In three dimensional space with gravity, one cuboid has an initial velocity relative to the other. Neither cuboid is rotating and they are both aligned to the axes. One of the cuboids is not moving relative to the origin(and is not affected by gravity). How to determine if they will collide?
My idea is to collide the travel paths of all the vertices of cuboid A with the surfaces of cuboid B and vice versa.
Is there a better way? If so, how? If my approach is flawed, what is the correct approach?