Garry's Mod Wiki

util.IsOBBIntersectingOBB

  boolean util.IsOBBIntersectingOBB( Vector box1Origin, Angle box1Angles, Vector box1Mins, Vector box1Maxs, Vector box2Origin, Angle box2Angles, Vector box2Mins, Vector box2Maxs, number tolerance )

Description

Performs OBB on OBB intersection test.

Arguments

1 Vector box1Origin
The center of the first box.
2 Angle box1Angles
The angles of the first box.
3 Vector box1Mins
The min position of the first box.
4 Vector box1Maxs
The max position of the first box.
5 Vector box2Origin
The center of the second box.
6 Angle box2Angles
The angles of the second box.
7 Vector box2Mins
The min position of the second box.
8 Vector box2Maxs
The max position of the second box.
9 number tolerance
Tolerance for error. Leave at 0 if unsure.

Returns

1 boolean
Whether there is an intersection.