Rotating from one vector to another
Heres the deal. I have two vectors, and I want to rotate from one to another. Now, it''s easy enough to find the angle between them, but I want to find out exactly how much to rotate on each axis. I also want to avoid building a rotation matrix, because I have no idea how to implement any of that and I''d like to keep it as simple as possible for the time being. I''m using opengl, so it''s actually quite simple to just rotate on each axis individually.
This old post sums up what I''m trying to do quite nicely: http://gamedev.net/community/forums/topic.asp?topic_id=63333
The first is straight up (0,1,0) and the second is the surface normal. The goal is to rotate the first so it is parallel to the surface normal. Like driving a car up a hill.
Feel free to use dot products and cross products and what have you, I understand that much so far.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement