I have a box that is drawn around my game that I want to check collisions with. Currently my BoundingBox
is made in a way that whatever is inside the box is colliding with it:
BoundingBox bb = new BoundingBox(new Vector3(position.X - 0.1f, position.Y - 0.1f, position.Z - width - 0.1f), new Vector3(position.X + width + 0.1f, position.Y + width + 0.1f, position.Z + 0.1f));
(Note: the +0.1f
is added so that it doesn't cause collision when an object is touching it, only when it passed through)
What I want is the inverse. I want a BoundingBox
around this box so that only objects outside of the box will cause collision.
Is there an easy way of doing this or am I supposed to make different BoundingBoxes around this existing one? Thanks
not
operator? \$\endgroup\$not
operation might not give the desired result. \$\endgroup\$