Hi all. I have a question about normalize coordinates that you get from the mesh. I'm trying to do a simple Sphere, but for some reason I create only one half and the other not. I have observed that this is due to the fact that the coordinates "vertices[i].z" is always positive and never negative. I would like to ask if you do not know what is wrong. Thank you :)
Mesh mesh = GetComponent().mesh;
Vector3[] vertices = mesh.vertices;
Vector3[] verticesN = vertices;
int k = 0;
for (var i = 0; i = 100)
{
Instantiate(sp_debug, verticesN[i], Quaternion.identity);
k = 0;
}
k++;
}
mesh.vertices = verticesN;
mesh.RecalculateNormals();
(Red sphere on picture are only for my debug. You can see there are only half sphere)
![alt text][1]
[1]: /storage/temp/30672-sphere.png
Trending Articles
More Pages to Explore .....