### Re: How to apply a quaternion rotation to many objects ?

if it seemed to work, I tested and my azimuths aren't correct :-(

I tested just by looking by the jit.window… 180° or 0° would mean the object projection on cam plane is "in front of me"..

With 2 objects only, in order to not mess all, it doesn't work.

Before to forget about that part and to work on another part because of own saturation, here is exactly what I'm trying to do.

I hope a comprehensive saint guru wise dude could push me into the right way…

I need to calculate azimuth & elevation of objects relatively to my camera direction/plane.

Using only the 3 Euler angles to do that doesn't seem to be enough because of gimbal lock/singularities.

So I decided to go to quaternions.

I attached a snapshot.

I'm requesting position & quaternion in the scheduler (global qmetro)

I'm sending both + the objects matrix to the jit.gen.

The codebox' code comes from this http://fr.wikipedia.org/wiki/Quaternions_et_rotation_dans_l'espace#M.C3.A9thodes_utilis.C3.A9es

I verified and indeed, the quaternion rotation for vector calculation is ok.

Then, I'm taking the resulting vector x and z component to calculate the azimuth via atan2.

Why am I thinking azimuth is wrong?

Whatever the position & rotation of my cam, if I keep the object in the center of my window, the azimuth should be the same, right ??

It doesn't seem to be the case here :-/

Where am I doing wrong ?

any ideas, leads, help, hands would be totally appreciate at this late hour or later of course :)

I'm almost despaired about this part.

[attachment=197409,4080]