Hi, I havn’t done much with rotations yet, but for a script I am working on at the moment I need to rotate a mesh (not Object Mesh) to be aligned with another.
The mesh I want to rotate is aligned with the x, y, z -axis, but I want to align it with 3 vectors (i, j, k). I have read a bit about rotation matrices and I think that is what I will be needing but how can I construct one with this data?
Hi, thanks for the replys. Both these replys work for Mesh Objects, but I don’t see how they work on meshes. My situation is that I have a list of vertices and I want to rotate all of them by an unknown amount to align the mesh formed by these vertices to another mesh. I already have the three vectors(i, j, and k) which represent the rotation of the vertices relative to their object. And I know the new vertices(the once I wont to rotate) are presently aligned to their objects local axies.
So, I wont to change the rotation of the mesh without affecting the rotation of the object. Dose that make sense or am I being confusing?
“Latest Blender you MUST reverse the matrix-vector product into vector*matrix!”
PKHG you just saved my life! I couldn’t make something work and then a bell went off in the back of my head to this thread. Sometimes it’s easy to forget that 1x3 * 3x3 is ok but 3x3 * 1x3 is not!
Whose bright idea was that? It is the near-universal mathematical convention that ordinary coordinate vectors are columns and matrices act on them from the left. Violating this expectation is very bad API design - especially when it was correct before!