Original Post
🔒 Locked
Pointing vector at vector
Advertisement
I looked at the thread it seemed to use D3DXMatrixRotationAxis. I need to get the values in Radians.
** EDIT **
Basically I have to be able to print out on the screen what the Yaw/Pitch/Roll from one object to another is, in radians which I can convert to degrees.
[edited by - Nullmind on April 30, 2004 9:27:14 AM]
** EDIT **
Basically I have to be able to print out on the screen what the Yaw/Pitch/Roll from one object to another is, in radians which I can convert to degrees.
[edited by - Nullmind on April 30, 2004 9:27:14 AM]
You need to be clear about what you are asking - what does the angle between two vectors mean? What is your frame of reference? You say you want the yaw, pitch and roll from two vectors, do you mean you want to know the yaw, pitch and roll that will take one vector and convert it to another?
Generally it all comes down to the dot product. The dot product will give you the cosine of the angle between two vectors. You need to be aware that you will only get 0-180 values out and hence you need to use cross product to work out if the value should be 0-180 or 180-360.
Generally it all comes down to the dot product. The dot product will give you the cosine of the angle between two vectors. You need to be aware that you will only get 0-180 values out and hence you need to use cross product to work out if the value should be 0-180 or 180-360.
That''s exactly what I wanted to know! Now that I know what the numbers the DotProduct give me, I know what I''m doing.
Hehe, don''t worry I''ll be attending some linear algebra classes soon here! Budget cuts kept me out of school for a bit
Thanks, I''ll post back with my results.
Hehe, don''t worry I''ll be attending some linear algebra classes soon here! Budget cuts kept me out of school for a bit
Thanks, I''ll post back with my results.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement