Getting a perpendicular direction vector to the north pole on a globe

I have an object moving around freely, in any direction, on a globe. Its forward and right vectors remain perpendicular to the ground at any place on the globe as it moves.

Now I would like to get the direction vector towards the north pole, but perpendicular to the ground. Getting the vector moving through the ground is easy (see below image where the blue lines do this), but how can I make it look in that general direction while keeping it perpendicular to the ground? Can I calculate this vector using the object’s current forward, right and up vectors?

68232-capture.png

You have your normal vector of your point on the globe, call this n, and you have your direction to the north pole, called v. then v minus the projection of v onto n, will be a point in the tangent plane of your point! Fortunately unity even has a built in vector projection, hence:

tangentVector = v - Vector3.Project(v, n);

Vector3.Project reference here.