could it be used out of the box or it’s need to be wraped in the code search algoritm for the topic task?
I need to select objects next to selected object by same vertices position
I have one question regarding the bounding box intersection. For not rotated Box primitive the corners of the boundingbox have the same position as the vertices of the mesh. The built-in intersects command do not offer threshold parameter, so if the two boxes are positioned as the yellow and red object in the image below, the intersects command will return false.
So, what is the real code behind the “intersects” command, and is the maxscript version of this code faster enough to be used with custom bboxes? For example, using the same image, the user will use the real bbox of the yellow object but as bbox of the red object will provide a “bbox” 10 units larger in all directions, so the maxscript code to detect the intersection before to go to vertex by vertex comparison.
correct… but for this specific scene it will not help. most of searching objects intersect by their bb
there is more complicated but more accurate solution - check intersection of ‘local’ bboxes in world space
I am asking for general cases.
I have done a quick search in the internet but was unable to find the code for 3d bbox intersection. Tomorrow I will continue searching. 
there is more complicated but more accurate solution - check intersection of ‘local’ bboxes in world space
For non rotated Box primitives the local and world bboxs have the same corner points, right?
right… but usually objects are rotated why ‘world’ bboxes are not correct to the intersection check
ok, so the way I read it is it’s a recursive Path finding/branching algo, within threshold…not that I can solve anything but at least the premise is now clearly defined.
For situation like in the image:
The cage shows the world BBOx of the box object. All spheres are inside this world Bbox, so
intersects will return true for all of them. Only the red sphere is in 10 units thresold. If we have a way to find intersection of local bboxes with threshold parameter then the code will find only the red sphere as intersected object to the box.We can use distance between the box and the spheres to find the closest object(which also intersects), but in this case the blue sphere is closer to the pivotPoint/center of the box than the red sphere.
I am not sure that I am right but the intersects command uses the world bboxes, right?
