#### Archived

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

# Rotation matrix from vector on a sphere...

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

## Recommended Posts

Hi, I have been away from math, matrix and quaternions too much time. Now I can''t solve this stupid problem. I have a sphere. I have an object moving on the sphere''s surface. I have a vector V from the center of the sphere to the object. What I want is simply have the object''s axis so that its "up" vector lies on V''s rect. Ok... example: the object is a man. If I simply move the man on the surface without rotating it, its feet won''t touch the sphere. I should rotate the man so that its feet always are parallel to the surface. I know it''s a simple matrix operation but I can''t figure it out. Help please! Thx! Bye Bye Etabubu

##### Share on other sites
to get the axis to rotate around, do a crossproduct between the two vectors youve mentioned.

to get the angle of rotation use the dotproduct.

then use the correct algorithm to convert this information into the appropriate rotation matrix.

if you dont know how to perform any of the above operations, try google, and im fairly sure it can all be found in the articles section aswell.

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 20
• 13
• 14
• 9
• ### Forum Statistics

• Total Topics
633365
• Total Posts
3011520
• ### Who's Online (See full list)

There are no registered users currently online

×