Author Topic: Box container search but with 2 positions?  (Read 768 times)

is it possible to write a function which allows a selection of two positions instead of one for a box container search? I would like to select two positions and have it find all objects within that area.

I am aware of initContainerBoxSearch, but as I understand that only uses one position and the search starts outwards from the origin of that position (not what I need).

why cant you just write a short function to average the position of the two vectors, and set the box dimensions accordingly? it shouldn't take more than 10 lines.

something like vectorAdd(vectorScale(vectorSub(%p1, %p2), 0.5), %p1); would get you the center

Or, getBoxCenter("x1 y1 z1 x2 y2 z2");

Or, getBoxCenter("x1 y1 z1 x2 y2 z2");
every other day i learn bl has more tiny occasionally useful functions, wow