Welcome back @yanasdf789,
As @sam.rothstein suggested you can use drillPickFromRay
as suggested in this example. I had similar requirement where I had to show different color line intersection with 3D terrain. This sandcastle link may be helpful to you.
Regards,