Model mesh vertices Postion not correct


model is correct but print out garbage;
model made with 3Dmax;
my code:

void Start(){
      print(mesh.vertices.Length);
      for( int i =0; i < mesh.vertices.Length; i++)
     {
           print(mesh.vertices[i]);
      }
}

It might be related, you have an error in the console. What is the error?

It could also be an issue with scaling. Try: Debug.Log(mesh.vertices[i].ToString("F8"));

error is null reference .I comment error code but no change

1 Answer

1

It could also be an issue with scaling. Try:

Debug.Log(mesh.vertices[i].ToString("F8"));

Oh, I understand. Unity takes the approximation of the vertices.right?

When printing a vector to the console, Unity will only print the vector one decimal place.