Question by
triangle4studios · Aug 21, 2020 at 07:41 PM ·
rotationnormalsvertexinstantiation
Rotate an Object to align to a specified Vertex.
I have an index of vertices and I can color them and instantiate an object on them. All works well. I however, have no idea how to rotate that object to that vertex's normal direction. Does anyone have any insight? This is the code I am using to rotate my object at present:
ob1.transform.rotation = Quaternion.FromToRotation(Vector3.zero, mesh[i].normals);
Thanks for any help.
Comment