So I made several heads with the same mesh in blender but with different orientations. When I import them, their orientations are unfortunately set as is. (I don’t want to change this)
Using vectors, I know the vector that goes from the center of the head to the top of the head.
I now want to rotate my head so that this vector now points to the top, how can I code this.
This is the code I tried so far.
Quaternion rotateUpDown = Quaternion.FromToRotation(solution1, Vector3.up);
for (int j = 0; j < verts.Length; j++)
{
verts[j] = rotateUpDown * verts[j];
//verts includes all the verticies of my mesh.
// I just rotate the mesh because I want to keep the orientation of my object.
}