Sphere collider within a sphere collider?

Is it possible to add more than one sphere collider to a rigid body game object and name them so as they do different jobs and can be called separately within the script?

For example. Can I have a sphere trigger within a sphere trigger and have them each do different jobs?

Thank you.

Yes. Each GameObject can only have one Collider component, but it can have children which have their own Collider components. You can then use scripts to get collision events from either and do whatever you want with it.

Thanks… Yeah, I figured that out after searching some tutorials on u-e :smile:

Another question, probably too broad to answer, but how many triggers can you get going in the same scene… I need at least 160 if I follow my initial development ideas…

Thanks.

I wouldn’t expect that to be a problem. A trigger is just a collider that responds to collisions differently, and as long as you’re not doing anything silly (like moving rigidbodies incorrectly, or moving static colliders in general) you should be able to have thousands. Mileage will vary based on use cases and target platform, of course.