ScriptSpot home

Forum topic · General Scripting

Detecting intersections?

By Alex Holmes · 2012-03-21

Description

I have found previous entries on people asking about this topic. But most of them I do not understand or seem to compicated for my simple project.

Basicly I have a number of boxes being generated at random sizes and positions, in a defined area, and as you would expect many of thge boxes intersect with each other.

If anyone could help me with a simple answer for detecting intersection and re positioning the box, it would help me out alot!

Cheers

Comments (1)
miauu

If you will work only with boxes then the bounding box of each box will match the box dimension. In this case you can use "intersects" function.

Take a look at this script from Anubis:
http://www.scriptspot.com/3ds-max/scripts/lumberman
and convert it to fit your needs.