cesium-unity icon indicating copy to clipboard operation
cesium-unity copied to clipboard

Attempt to work around warning spam from Unity physics engine

Open kring opened this issue 4 months ago • 0 comments

Detected one or more triangles where the distance between any 2 vertices is greater than 500 units. The resulting Triangle Mesh can impact simulation and query stability. It is recommended to tessellate meshes that have large triangles.

This commit tries to avoid this warning by scaling down the vertex positions of every tile mesh to fit inside a cube with a diagonal <= 1 unit. And then scale it back up to its proper size via the transformation matrix.

It reduces the number of occurrences of this warning, but for some reason it doesn't eliminate them entirely.

Draft because I'd like to eliminate these warnings entirely, and I don't know why it isn't working.

This PR also gives each mesh a name derived from the tile's content URL, so that the warning tells us which tile is the problem. This should probably be removed before this is merged because the URLs can get quite long.

kring avatar Oct 29 '25 02:10 kring