That was fast cool!
We're using a few hundred colliders, mesh colliders, convex. I know what you think it works! it works fine and fast and great, 99.9% of the time. and then BOOOM
See the screenshot, I could catch it it's quite hard to catch on the profiler so I was a bit lucky there
Edit: the mega flush I'm talking about is
for (int i = 0; i < implementations.Count; ++i)
{
implementations[i].SetColliders(colliderShapes, colliderAabbs, colliderTransforms, 0);
implementations[i].UpdateWorld(0);
}
It seems the UpdateWorld is some sort of flush and is called n^2 when destroying a batch of colliders. I could be wrong, just my thought
Second update: I drew the time for each collider destruction to the next (faster one) from the profiler % info
It's not 1/n^2 exactly but it doesn't look linear to the number of colliders being destroyed
We're using a few hundred colliders, mesh colliders, convex. I know what you think it works! it works fine and fast and great, 99.9% of the time. and then BOOOM
See the screenshot, I could catch it it's quite hard to catch on the profiler so I was a bit lucky there
Edit: the mega flush I'm talking about is
for (int i = 0; i < implementations.Count; ++i)
{
implementations[i].SetColliders(colliderShapes, colliderAabbs, colliderTransforms, 0);
implementations[i].UpdateWorld(0);
}
It seems the UpdateWorld is some sort of flush and is called n^2 when destroying a batch of colliders. I could be wrong, just my thought
Second update: I drew the time for each collider destruction to the next (faster one) from the profiler % info
It's not 1/n^2 exactly but it doesn't look linear to the number of colliders being destroyed