How does the camera achieve a spherical tilt 3d view, like Google Maps

Hello guys, I have a requirement: I have a ball with a radius of 1000, and when the camera is more than 100 away from the sphere, the camera looks towards the center of the ball, like a 2D view on Google Maps; When the camera is less than 100 away from the sphere, the camera gradually tilts to look at the sphere, and the camera always needs to be parallel to the sphere when moving, just like Google Maps switches to 3D view. How to get the implementation?