#### Archived

This topic is now archived and is closed to further replies.

# how can I perform a rotation in the direction of a line?

This topic is 5824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
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.

1. 1
2. 2
Rutin
15
3. 3
4. 4
5. 5

• 9
• 9
• 14
• 12
• 10
• ### Forum Statistics

• Total Topics
633269
• Total Posts
3011149
• ### Who's Online (See full list)

There are no registered users currently online

×