Quote:> > For OBB-plane, project the OBB onto a normal line to the
> > plane. The plane projects to a single point. The OBB is
> > just touching the plane when the projection interval has
> > the plane projection point as an end point. You can easily
> > determine which vertex of the OBB generated the
> > corresponding end point of the projection interval.
> However that depends on the box not moving very far "into" the plane
> (without modification).
What I described is for a static OBB. For a moving OBB, you
can compute the projection interval as a function of time. If
the time interval over which you want to detect collisions is
[0,T], then you can look at the projection interval at t = 0 and
determine on which side of that interval the projected plane
point is. At time t = T, it is possible that the OBB and plane
are still separated, but you can test if the projected plane
point is now on the *other side* of the projected interval for
the OBB. If this is the case, then the OBB must have passed
through the plane during the time interval. If you want first
time of contact, you can determine that by computing the time
when the plane projection point is one of the end points of
the projected interval for OBB. Just linear equations in t to
solve.
--
Dave Eberly
http://www.magic-software.com