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]);
}
}
void Start(){
print(mesh.vertices.Length);
for( int i =0; i < mesh.vertices.Length; i++)
{
print(mesh.vertices[i]);
}
}
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.
– ArachnidAnimal
It might be related, you have an error in the console. What is the error?
– ArachnidAnimalIt could also be an issue with scaling. Try: Debug.Log(mesh.vertices[i].ToString("F8"));
– ArachnidAnimalerror is null reference .I comment error code but no change
– ilike0