Jump to content
  • Advertisement
shintiger

From OBB-OBB intersection test to Sweep OBB test?

Recommended Posts

I understand what stationary OBB intersection test is get min/max scalar in 15 axises, when all overlap, then minimum interval overlapping is the axis that used to push away 2 OBBs to "just touch". I have complete this.

So in sweep test, how to choose the right axis projecting and how every projection transform? I only need a ratio of current velocity when start intersect from disjoint.

I have read Ron Levine's post:

http://www.realtimecollisiondetection.net/files/levine_swept_sat.txt

 

And oliii's:

I get the code but cannot get it works as expect when port to my project, even I don't clearly know what params refer to.

 

For further optimization, I wish somebody can teach me how velocity part works conceptually instead of just code.

My case is DOBB-OBB only(dynamic to stationary).

Edited by shintiger

Share this post


Link to post
Share on other sites
Advertisement

You cannot form a simple equation and solve it if your OBBs carry angular velocity.

Otherwise, conceptually, finding a time of impact (TOI) along a given axis can be done by simple linear interpolation. For example, say we have a point A traveling along a velocity V at a plane P. It is possible to do:

d0 = Distance(A, P);
d1 = Distance(A + V * dt, P);

Then d0 and d1 can be used to lerp from A to A * V + dt by forming the interpolant: d0 / (d0 - d1).

The same concept can apply to any axis and any given point, even axes and points on the surface of OBBs.

Edited by Randy Gaul

Share this post


Link to post
Share on other sites

I got it now, sweep OBB is almost as same as sweep AABB, except two things:

1. 15 axis rather than xyz

2. each axis test may using scalar representation rather than simple xyz diff

 

And I have just finish this part, thanks Randy.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!