EdzUp: On second thoughts! I had a second look at the 'global==false' part of your code. And... it does stick if you get within about 3 degrees of the north or south poles.
But on the other hand... in a real life situation, 3 degrees is a pretty small target to hit. And in a fast-paced space action game, which is what I was originally trying to work this out for, you're probably moving more than 3 degrees per frame anyway. You'd bounce right over the 'pothole' without seeing it. This is videogames, not rocket science!
So I might just nick what you've got there a run with it. Thank you, Ed, you really were a saint! :)
But on the other hand... in a real life situation, 3 degrees is a pretty small target to hit. And in a fast-paced space action game, which is what I was originally trying to work this out for, you're probably moving more than 3 degrees per frame anyway. You'd bounce right over the 'pothole' without seeing it. This is videogames, not rocket science!
So I might just nick what you've got there a run with it. Thank you, Ed, you really were a saint! :)