When I try to collect the array from the mesh, they’re off by a huge amount. A vertex located at the start of the object is 0,-0,-0.01 and a vertex located at the end of the object is… 1, 0, 0.1. This doesn’t seem to make any sense.
These are also -after- the coordinates are transformed into world space.
For a mesh that is 16 meters long and comprised of 70 points, I would expect vertex 65 to be at 3,0,16.
This is the code I am using to collect the information.
CurrentObject=Instantiate(TerrainObjects[0])asTransform;
meshFilter =CurrentObject.GetComponent<MeshFilter>();
vertices = meshFilter.mesh.vertices;CurrentObject.transform.parent = gameObject.transform;//Vector3 EndVectorLocation = transform.InverseTransformDirection(vertices[10]);Debug.Log(transform.TransformPoint(vertices[10]));
Have I missed something in getting the correct transform positions?