Attached is an example model and user library comprising commands to return an array of objects whose bounding boxes intersect, and a Collision Detection object to drop into your model.
The Collision Detection has a ticker interval label to adjust the frequency of checks and will switch the colliding objects to selected. It looks for two groups - "Obstacles" containing static objects in the scene (which may be overlapping and not recorded as collisions) and "Colliders" which are the objects navigating the scene and should be checked for intersecting bounding boxes.
In the example model I'm adding the flowitem when it is created using
Group("Colliders").addMember(item)
The detector code is on its FlexScript label, 'analyseScene', which is first scheduled to run by the object's reset trigger.
Thanks Arun I'll investigate
It's great!!!!
creative work😀
hi @jason_lightfoot_adsk, thanks for your work. could you please further explain the attached code as screenshot? thank again!
@Walker_Huang you can find the code and mathematics used within this implementation here: Solved: Detect whether there is an obstacle between objects - Autodesk Community
We have noticed some cases where this example implementation fails - at some point we hope to have time to debug and fix those cases.
thank you very much! after going through it, I understand its mathematic principle. truly helpful.