article

Jason Lightfoot avatar image
7 Likes"
Jason Lightfoot posted David Seo commented

Collision Detection of Bounding Boxes

collisiondetection.gif

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.

1741087337785.png

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.

collisionDetection3.fsm

BBCollisionDetection2.fsl

bounding boxcollision detection
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Article

Contributors

jason.lightfoot contributed to this article

Related Articles