#### Archived

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

# Turning a direction vector towards another?

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

## Recommended Posts

I have a direction represented by a normalized vector, and I want to be able to turn that direction towards another direction by a certain amount (ie, not set it to the other direction, but ''bend'' the direction towards the other direction). Can anyone tell me how I could do that? Sorry if its been asked before.

##### Share on other sites
First get the angle between the two vectors. That''s the total angle. Next, take the cross-product of the vectors. That''s the normal to the plane of rotation. Use that axis and part of that angle to build a rotation matrix. Multiply the first vector by that matrix. Rock on.

"Sneftel is correct, if rather vulgar." --Flarelocke

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5
frob
13

• 9
• 15
• 10
• 9
• 17
• ### Forum Statistics

• Total Topics
632602
• Total Posts
3007363

×