Transform GameObject using a Transformation Matrix (Matrix4x4) generated by two custom orthonormal axis.
Hi, I'm making a game that required me to make mesh snap between objects, and I decided to make the snap code myself. But here is my problem... I had already estimated two orthonormal axis: one in my origin object and one in my target object. If I align these two axis I will align my two objects the way I desire them to be. With the two orthornormal axis, I estimated the transformation matrix that is able to transform the points of the object in the coordinate system of the origin object to the coordinate system of the target object.
The transformation matrix is a Matrix4X4. The problem is that I'm not being able to apply this transformation directly to the gameobject. I dont know how to do this exactly, since I cant just multiply the game object to this Matrix4x4, and I dont want to multiply the mesh points to this matrix, I want to move the entire gameobject of the origin object using this matrix.
If anyone can help, I will be very pleased.
Answer by lucas_la · Apr 10 at 07:03 PM
Solved. The solution on this page worked for me: https://answers.unity.com/questions/1134216/how-to-set-transformation-matrices-of-transform.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613055226im_/https://answers.unity.com/themes/thub/images/avi.jpg)