/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h
Find closest point on a Sphere to a Line. When line intersects Sphere, then closest point to LineOrigin is returned.
static void SphereDistToLine ( FVector SphereOrigin, float SphereRadius, FVector LineOrigin, FVector LineDir, FVector & OutClosestPoint )