|
-
Sep 16th, 2009, 03:23 PM
#1
Quaternion from two 3D Position Vectors
This came up in the Games forum, I thought I'd post it here since it has a great deal of mathematical relevance.
Given two 3D Position Vectors indicating the positions of two objects on a 3D grid, is it possible to create a quaternion to describe the absolute rotation required for object 1 to be pointing at object 2?
And if so, how?
I've found about 3 or 4 poorly described code samples trying to do this, but they all either error or produce undesirable results, or break in certain conditions (such as when object 1 is at the center point of the grid).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|