The documentation for the function contains this comment...
"Assigning triangles will automatically Recalculate the bounding volume."
Experimentally I am seeing differences if I manually call this after assigning triangles?
mesh.triangles = newTriangles;
Bounds b1 = mesh.bounds;
mesh.RecalculateBounds();
Bounds b2 = mesh.bounds;
if (b1 != b2)
{
Debug.Log("Bounds "+b1+" => "+b2);
}
Bounds Center: (19.5, 0.8, 19.5), Extents: (28.1, 0.8, 28.2)
=> Center: (19.5, 0.8, 29.4), Extents: (28.1, 0.8, 38.0)
Is the documentation incorrect, or am I mis-understanding something?
Paul
Trending Articles
More Pages to Explore .....