View Full Version : orientation vector

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).

Omaha

05-17-2002, 04:47 PM

Wrong Open Library.

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.

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.