Related: How to check if two meshes intersect in python?

This above question answers how to know if two known objects intersect. I want to know if any objects intersect or are inside of a known mesh. There are too many objects in my scene to iterate over each one to see which one overlaps. I just need to know if any object overlaps with a given object.

Bonus: Also to know what object it is that overlaps with the given object


1 Answer 1


Use some kind of quick bounding box culling like this (javascript demo on collision detection by mozilla, but should be easy enough to adapt for your case) to eliminate objects that cannot overlap. Beware that Blender objects' provided bounding box is in object space, so may not be axis aligned in world space. You will need to convert it to world space and then generate a new bounding box of that bounding box that is axis aligned.

Then build bvh trees for each mesh that may intersect, and test, re-using the tree for your test object.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .