Too many colliders or rigidbodies

Hey folks,

I tested my project yesterday and got an error while trying to generate a road of 10,000 units with houses and trees beside:

Where is the limit of rigidbodies or colliders?
In my project, it stopped at 75716 objects.

I think the error should give you a clue. You have too many Colliders - PhysX must be having a heart attack over there.

Using a series of generated mesh colliders will work around this issue… you should batch them into mesh collider groups to get around those physx object limits, ie either one big collision mesh for all of it, or a few collision mesh chunks should do the trick. You have hit hard limits.

No, the error is fine :smile:
I won’t change anything about it.

I just wanna know where is the limit there.
So when does UNITY say “thats too much”
Is this a fixed limit?
I want to understand the “background” :slight_smile:

My guess is that it’s depending on the machine resources, like if you have DX11 NVIDIA card with 4GB VRAM will be less likely to hit the roof than using an ATI (no PhysX) with 512MB VRAM. At any rate Unity is 32bits, so you also have the RAM issue if you have too many big textures… and so on… :wink:

In the editor I’m coming up against this limit when doing a brute force test and it’s @ 65536 colliders.

Of course, if you’ve got that many colliders loaded in the scene you’re quite bonkers. :stuck_out_tongue:

Looks like it’s some raycast side effect. I got 360x180 zones ( of 1°x1° for a planet ) . Each zone is an independant GO
A raycast to one of this zones launches an error. It seems there’s a lack of toughness in unity ray casting algorythm.
Maybe it’s because of too numerous colliders ? or overlapping colliders ?

Anyway it’s some really crappy handling from UT programmers. If there’s a limit, just say it.

Once again i’ll have to waste time because of crappy coded stuff… now i’m used of this :wink:
This is the unity way of life. gimme your money and help yourself :smile:

have nice day !