- Home /
How to Manually Test Trigger Overlap
I have procedurally generated levels that generate linearly, and I need to make sure none of my module are overlapping each other.
To that end, each module has one or more box trigger colliders of the ModuleSpace layer, which only contains those colliders.
I need to know how to manually test if the triggers are overlapping another trigger. I can't use OnTriggerEnter because I need everything to happen within the Start method/in the same frame, and possibly change the module's size/shape.
I've tried Rigidbody.SweeptestAll but that doesn't work if the Vector is zero, or if a trigger was instantiated inside another trigger. I also can't use Physics.OverlapSphere as it needs to conform exactly to the box.
Anyone have any advice? I just need to know how to manually test if a box collider is intersecting with another box collider.
I would like to the know the answer to this now. I have a released game, it usually works, but some report a triggerexit not working, so I want to manually check the trigger on this particular object to be 100% sure.
Your answer
Follow this Question
Related Questions
How do I check that a trigger collider is *completely* nested within another trigger collider? 2 Answers
Performance issues with trigger colliders and lots of projectiles. 2 Answers
OnTriggerEnter2D triggering multiple times when moving around inside the trigger area. 1 Answer
Initialising List array for use in a custom Editor 1 Answer
Spawning an object on the opposite side of an activator object with no overlaps 1 Answer