- Home /
check box overlap / colliders in edit mode
I'm writing an editor script that places objects, so to make sure they do not overlap, I would like to check that.
But since the physics simulation isn't running in edit mode, I can't use colliders. I need to place objects fairly close, and some are long and thin, so a rough approximation with bounds fails if they are rotated.
Is there a relatively easy way to check? I'm fine with 2D checking since they are all placed on a flat surface, so if there's a simple solution for rectangle overlap in 2D that would help as well. Or a trick to rotate bounds that I missed?
I checked for other solutions but the most common answer is approximating with sphere.overlap, which doesn't help me (I need to check boxes and I need to be relatively exact).
Your answer
Follow this Question
Related Questions
Make colliding object not collide in overlapped area 0 Answers
2DColliders going through eachother 1 Answer
My object is going through boundaries Problem! 1 Answer
Can Camera.WorldToScreenPoint be used to check if one collider is over another in screen space? 1 Answer
How to avoid objects bouncing and overlapping after collision? 0 Answers