View Full Version : orientation vector

05-17-2002, 12:36 AM
Just started with openAL and tried to set the listener orientation that is two vectors; "at" and "up".

Now my question is: what is the definition of an orientation vector?

In my engine I just use one vector for rotation vec3(xrot, yrot, zrot) and one for my position vec3(posx, posy, posz).

05-17-2002, 03:47 PM
Wrong Open Library.

05-21-2002, 07:35 AM
You are missing one piece of information, which just may answer you question.

You have a position and a axis of rotation, the piece of informaiton that you need is the angle of rotation. Without the angle of rotation you can be pointing any direction along the plane where your axis of rotation is the normal to the plane.

I am working on this problem to find where my next position will be this frame.

Currently I am taking the vector <0,1,0> and the vector that the projection of the true direction I am heading on the xz plane. I then take the cross product of those two vectors and come up with a vector that is comming out of the side of the object. I then take the cross product of my true up vector (axis of rotation) and the prevois cross product. the resulting vector is the direction that I am heading. Then I just set the magnitude of the last cross product resulting vector to be the correct length and add that vector to my last position.

Like I said before I am still working on it but I believe that it should work.