Let's say I have a vector V (v.x,v.y,v.z) which is normalized and points somewhere in 3d space. And that I have another vector Z of (0,0,1). Knowing only these two things I'm looking for a transformation matrix that will take the vector Z and turn it in to V.
Or some other way to get to the vector V from the vector Z.
In my application for this I'll be taking other vectors that are in a Z axis space and putting them in (or rotating them to) the same space as the V vector. But a proof that it's working will be to take Z and make it V.
I know that if I had this matrix I could multiply the vec3 by the matrix and get the answer. But making this matrix from only that destination vector is what I'm not sure how to do.
Seems like it might be super simple and that I'm just not thinking of it correctly. Answer right in front of my face?
No comments:
Post a Comment