# Yaw on a spherical world

I am trying to make a game where the player can walk along the surface of a spherical planet, and am not sure how to handle orientation. Pitch is relatively easy, as it is simply how much "above" or "below" the plane tangent to the surface of the sphere you are looking. However, yaw is more tricky. Right now, I have yaw configured as essentially the "bearing", where yaw=0 means you are pointing east and yaw=90 means you are point north.

This creates to problems:

1) On the poles, the moment gets messed up becouse the angle between the "Up" and "north" vector is very small.

2) If you move over the pole, your view will suddenly flip so that you are still facing the pole. This is a problem similar to #1.

3) If you walk in a straight line, you will walk along the rhumb line, rather then the great circle line, unless you purposely change your yaw. In the "real" world, you can walk "straight" and still walk on the great circle line (correct me if I am wrong).

Is there some trick or other reference system I could use to solve these problems?

For reference, this is my current code:

Up = glm::normalize(pos - body->pos); //Points from center of sphere to camera