Physics engine grid optimization

Hello all,

i read somewhere that if some guys where able to simulate collision with a lot of colliders(10000 to 100000) that were rather spread accross a big area by creating a grid and only test collision when 2 colliders where within a certain distance, so that a collision was possible. My question is now wether unitys physics engine works like that as well. This seems like very easy optimization method. Unfortunately i wasn’t able to find anything online.

Best Regards

All physics engines have this kind of optimization otherwise they’d be too slow. This phase is called the broadphase. There are different broadphase algorithms though and Box2D and PhysX use different ones.