OBB-to-plane

Just like with the AABB, we know that an OBB does not intersect a plane if all of the OBB vertices are on the same side of the plane. The actual test to check if an OBB and plane intersect will be very similar to the AABB-to-Plane test:

OBB-to-plane

Getting ready

We are going to implement a function to test if an OBB and a Plane intersect. This function will be similar to how we checked if an AABB and Plane intersected. We will project the OBB onto the normal of the plane and find the interval of this projection. If the interval contains the origin of the plane, we know we have an intersection.

How to do it…

Follow the given steps to find intersections ...

Get Game Physics Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.