Hi,
I’m trying to find all the gameobjects that are within range of the current collider. I don’t want to use event-handling methods like OnTriggerXXX/OnCollisionXXX, and I don’t want any of the objects to have rigidbodies either. All I want is given a collider, find all the other colliders that overlap it.
The closest thing I know of is Physics.OverlapSphere, but it’s limited to a sphere shape. I’d like to do something very similar with a collider.
Any ideas?
http://docs.unity3d.com/Documentation/ScriptReference/Bounds.Intersects.html
Something like this?
Although if you used OverlapSphere you could put in a layermask. This function actually checks against bounding volumes, not colliders.