Visit this page for a Unity3D example using spherical coordinates.
I recently had to implement a drag and drop camera feature for a college course. The OpenGL program, we had to submit, had to contain a camera that can be controlled by moving the mouse around. The camera itself should always look at a fixed point in the 3D space while being rotated on two different axes like it’s stuck to the inside of a sphere.
Continue reading How to program an arcball (orbiting) camera in C++ and OpenGL