# Understanding angles handling in ofxSphereCam

Hello I am using this addon to tween movements of the camera and his target.

The addon is very cool! But i can’t understand how to make rotate around all the 360 sphere degrees corrently.
With sphereTo you can rotate/move the cam around the target, using azimuth/longitude and zenith/latitude angles:

``````sphereTo(ofVec3f(r,a,z), speed_in_ms);
``````

The code I am using to add 45 degrees steps to the azimuth/longitude angle is:

``````case 'd':
angleRotate -= 45;

//ofVec3f(r,a,z) //Where r = radius, a = azimuth and z = zenith
camRotate.set(1000, angleRotate, 0);
sCam.sphereTo(camRotate, 1000);

break;

case 'f':
angleRotate += 45;

//ofVec3f(r,a,z) //Where r = radius, a = azimuth and z = zenith
camRotate.set(1000, angleRotate, 0);

sCam.sphereTo(camRotate, 1000);

break;
``````

The problem I am having is that: when jumping between some specific angle degrees, the camera makes a “rare jumpy rotation”.
I the case of this video, the las jump you can see it happens when moving the angle longitude from 180º to 225º. This happens also when moving from -45º to -90º and others…

After looking more time on it, I have seen another “strange behavior” when using the sphereTo method like this:

``````camRotate.set(distance, angleRotateLong, angleRotateLat);
sCam.sphereTo(camRotate, 2000);
``````

When longitude angle is 0 degree, latitude angle do not affects the camera perspective.
When longitude angle is not zero, latitude changes affects the camera. (but I am getting the strange jumpy movements like explained on the previous topic above.)