Getting a rotation matrix based on position and target vector?
Hi. Is there a function that I can use to create a rotation matrix based on a position vector and a target (aim at) vector?
I tried using D3DXMatrixLookAt() and got some crazy results when I applied the matrix. I have a scale and translation matrix as well and know that order of multiplication matters but none of the combinations worked for me.
I can always write some code to use trig functions to figure out degrees or radians but I would much rather know about and use an existing function.
Thanks for any pointers.
try this:
normalizing the vector should give you the rotation should it not? not sure i might be wrong, if so, please let me know :D
normalizing the vector should give you the rotation should it not? not sure i might be wrong, if so, please let me know :D
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement