Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Super slow fluid when enabling colliders
#3
That was fast cool!

We're using a few hundred colliders, mesh colliders, convex. I know what you think Sonrisa 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
Reply


Messages In This Thread
RE: Super slow fluid when enabling colliders - by sdpgames - 30-03-2021, 10:20 AM