31-03-2021, 11:36 AM
(31-03-2021, 10:22 AM)josemendez Wrote: Did some stress/performance tests, but still unable to trigger this. The fact that scaling objects close to zero improves performance is a hint, though. When inserted/removed from the multilevel grid, the size of the collider's bounds determines the level of the grid it will be inserted into. Larger colliders are inserted into coarser grids, smaller ones into finer grids. On average, a typical collider is inserted in only 8 cells of whatever grid level it is assigned to.
There's minimum and maximum levels tough, so extremely large colliders may need to be inserted into many grid cells at the top grid level. This could explain the behavior you're getting, as the algorithmic cost for inserting a *really* large collider is still constant, but the constant factor is large.
Still, this might not be your case. Just trying to reason about this. Any more details you can give about the kind of colliders you're using? (if meshcolliders, do they have many triangles? are they very large or really small in world space? etc)
That's true that our world has a peculiar setup in that respect, it's very small. The whole scene is around 2mx2m. We did that because it's the way the water looks the best. Scaling the water by changing the setting didn't work for us we had many issues, it was much simpler to scale it down like that.
The objects have very small poly count, they are voronoi shatter pieces of simple shapes such as a box (so not only the collider is convex but the actual mesh is built that way too).