how can I perform a rotation in the direction of a line?
I have an object that is facing down my Z axis and I want to rotate it so that it points in the direction of point A to B. Is there an easy way to do this?
Thanks,
RT
Strictly speaking you need two directions. You are pointing down the z-axis, but which way is up? With two directions a cross product will get you a third direction. If those three directions are mutually orthogonal, ortho-normal?, then you have everything you need for a rotation matrix. If you are unfamilar with rotation matrices think of a standard rectangular coordinate, i.e. (x,y,z). That says go so far in the x direction, then so far in the y direction and finally so far in the z direction. Here instead of the x direction being (1,0,0) it is some vector.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement