I have an object with 3d coordinates (x,y,z)
I need to calculate azimuth, elevation of objects relatively to the cam view direction & plane.
If I keep the object in center of my view (I mean, if I aim at it with my cam), even If I rotate the cam, translate it keeping the object in the center, I should have the same azimuth value, right ??
I don't have that.
Second question, the calculation.
I'm doing (object coordinates - cam position), in order to translate the object to the cam.
I'm taking the resulting coordinates and make the sandwich product with the quaternion and its conjugate.
(I followed this for the pseudo code :http://fr.wikipedia....ns_l'espace)
Then, I have a vector result and I take X & Z component and calculate the atan2.
Does it seem right ?
any leads or explanation would help me a lot in my struggle
Edited by gluontronic, 23 June 2012 - 01:44 AM.