How to calculate the surface normal Vector3 between two Vector3's on a Sphere.

Hi all,

I’m currently placing objects on the surface of a sphere, and can already calculate the point between the two object positions (using the code below). I have a Line Renderer drawing a line from point A to C, with the calculated point being B, however, how can I calculate the surface normal position of point B so my line will arc across the sphere?

public static void CreateLink(GameObject linkModeTarget)
{
    Vector3 pos = Vector3.Lerp(linkModeParent.transform.GetChild(0).position, linkModeTarget.transform.GetChild(0).position, 0.5f);
    
    LineRenderer linkModePrefabOptions = linkModePrefab.transform.GetChild(0).GetComponent<LineRenderer>();
    linkModePrefabOptions.SetPosition(0, linkModeParent.transform.GetChild(0).position);
    linkModePrefabOptions.SetPosition(1, pos);
    linkModePrefabOptions.SetPosition(2, linkModeTarget.transform.GetChild(0).position);
}

This is the current result:
79241-sphere-current.jpg

And this is what I’m after:
79242-sphere-desired.jpg

Thanks for having a look.

Let SC be the center of the sphere.

Let BB be ‘bad B’, the B you currently have.

Let R be the radius of the sphere

B = SC + ((BB - SC).normalized * R)