Hey guys, I have 2 grids that have one face each in some random space in 3d and they’re both rotated. The rotation is applied so its all 0’s, but the transformation isn’t (it can be, but it doesn’t have to be). How can I match the rotation of plane A to plane B, without changing the position of plane A’s vertex[0]? Doesn’t matter if it does change first and then I just move it all, but that’s the whole picture.
Obviously this is all way easier to do when the rotation isn’t applied, but unfortunately this is what I have.
My initial feeling is to use the normal of each face to construct a matrix with up and cross product, but I don’t know what to do after that. Any ideas?
in a scene with the default cube, add a grid, then run this script. the grid will be aligned to the face at index zero on the cube. from this example you should be able to make whatever tweaks you need to achieve your desired results.
Thanks,
It works if both the Grid and the Cube only have been rotated in object mode and they still have there rotation data left. If I go into edit mode and rotate the mesh on the Grid and the go back to object mode and run the script, I will not get the Grid aligend to the face of the Cube.
Any ideas on how a script for that will look like?
//W