Skip to main content
GameDev.net gamedev.net
🔒 Locked

Rotation

Started by pr0teus Jan 10, 2001 at 9:18 PM 2 replies 650+ views
Original Post
pr0teus
pr0teus
Hey, I know two pieces of information. The vertices of my triangles and their normals. How, then, using this data, can I find the rotation values necessary to rotate vector A (0, 0, 1) so that it points in the same direction as vector B (the normal)? Thanks in advance, Ben
LilBudyWizer
LilBudyWizer
If A and B are unit vectors then the dot product of A and B is the cosine of the angle between them. It is actually the magnitude of A times the magnitude of B times the cosines of the angle between them, but the magnitudes are one for unit vectors.
Keys to success: Ability, ambition and opportunity.
pr0teus
pr0teus
I know the dot product is the angle between them. But that doesn''t tell me what the rotations were that made the normal face that way. (ie, is the rotation on the x axis? y axis? a combination of x and z?)

Ben

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.