Hi,
(I was actually looking for such formula myself, so, you for that)
The formula you provided works but it doesn’t directly give the point of intersection between the two vectors. Instead it yields two values for the running parameter t for which the vectors intersect. If we define the two line (our vectors) equations as :
L1( t ) = p1 + t * d1
L2( t’ ) = p2 + t’ * d2
The point of intersection can be calculated with t1 or t2 like so :
Intersection point = p1 + t1 * d1 = p2 + t2 * d2
Always check that the two expressions give the same result, if not it probably means that the two vectors never collide.
Cheers