Many colliders = slow performance

Hi,

my scene consist of many box-colliders. i have a framerate of 20fps. if i delete some box-colliders from the end of the scene(which will be not seen with the camera) the framerate goes up to 30. I dont understand this. I thought the framerate depends only on the things which will be seen with the camera (equally to the drawcalls)

Sphere primitive collider are very cheap to compute, less intensive that any other primitive collider. Do you really need box colliders?

The framerate depends on everything that needs to be computed. The CPU can only do so much; it’s not magic. More colliders = more stuff that has to be computed = lower framerate. More code that runs = lower framerate. Everything you do lowers the framerate, some things more than others.

–Eric

How many is “many” ?

How many would many be if he wants many money ?

I wonder also if they are moving… i thought “asleep” colliders shouldn’t take up too many resources.

PhysX does use some kind of optimization to allow the use of more colliders than you’d be able to without optimization, but there are still limits, especially on very slow devices like the iPhone.

–Eric