distance to the crossing of 2 lines (Line Trace)

If I were you, I will solve it using simple algebra (find two vectors intersection):-

  1. Form a 2d vector for both (using their normalized directions). 2d vector can be formed by eliminating the ‘z’ component.
  2. You will find the point where both intersects - then this is easy as you can calculate the magnitude (length) between two points.