Shared Vector / Bounds Problem

Hey all

Say in Unity you have 2 different sized boxes, 1 large and 1 small. How can I tell if the small box is within the bounds of the large box. I can not use collision detection because I need this process to repeat a couple thousand times quickly and neither raycasting because the normals of the collider are on the opposite side. I am currently using the bounds contains function however when rotating the large box object the bounds expands to cover the diagonal angle of the rotation.

Any suggestions? Many thanks to all those that can help.

  • Winston

Basically what you’re trying to achieve is a OBB to OBB collision detection. There should be lots of examples out there but here’s a good table to help you start:

http://www.realtimerendering.com/intersections.html