Returns the shortest distance between a Ray and a segment.
The segment is defined by a start position and an end position in world space
The distance returned will be in world space (world units).
If the camera parameter is not null the distance will be returned in screen space (pixels)
ray - The ray
segStart - The start position of the segment in world space
segEnd - The end position of the segment in world space
camera - The renderer camera if the distance is required in screen space. Null if the distance is required in world space
the shortest distance between the ray and the segment or -1 if no solution is found.