Ah, thank you for that. Your code works but I realize I didn't describe my issue as well as I should have. I need for the user to be able to control the orbit with the mouse. In other words, as they move the mouse right, it will orbit towards the right, and same for the left and up and down. Right now the camera orbits around its own center when the user moves the mouse. I just need the axis it's rotating around to be at a distance.
Thanks for your code though. Perhaps I can use it in some way towards what it is I'm after.