Skip to main content
GameDev.net gamedev.net
🔒 Locked

obb collision

Started by Nanook Sep 24, 2010 at 1:38 PM 1 replies 850+ views
Original Post
Nanook
Nanook
Hi,

I'm reading a paper by Eberly (http://www.geometrictools.com/Documentation/DynamicCollisionDetection.pdf). On page 9, section 2.3.3 equation 3, is x the contact point on A and y the contact point on B?

On page 12 in the table there. theres x_0, x_1 and x_2 for all the seperating axes, but two for y? Also the 0,1,2 on x and y represent x,y,z of the point right?


Dave Eberly
Dave Eberly
Quote:
Original post by Nanook
On page 9, section 2.3.3 equation 3, is x the contact point on A and y the contact point on B?


The x_i are the coefficients associated with the axis directions A_i. Name the actual contact point K. In terms of the parameters associated with the first box, K = C0 + T*V0 + sum_{i=0}^{2} x_i*A_i. In terms of the parameters associated with the second box, K = C1 + T*V1 + sum_{j=0}^{2} y_j*B_j.

Quote:

On page 12 in the table there. theres x_0, x_1 and x_2 for all the seperating axes, but two for y?


What do you mean "two for y"? That table has various formulas for y_j for 0 <= j <= 2.

Quote:

Also the 0,1,2 on x and y represent x,y,z of the point right?


As I mentioned previously, the x_i are coefficients for the axis directions A_i for the first box and the j_y are coefficients for the axis directions B_j. In linear algebra terminology, the box center C0 is the origin for a coordinate system and the axis vectors A0, A1, and A2 are the basis vectors for that coordinate system. The x_i are the coordinates of a point relative to the coordinate system.
Nanook
Nanook
I think I understand it now :p I've implemented it using your code from your site.. but its still not working properly.. I've tried to write it up my self to try to learn from it, so still need to figure out how to get it working properly.. :)

Btw in your code.. I cant find any examples where you actually use the IntrBox3Box3 class? Is there one?

In this function, how do you calculate numSteps? I've tried setting it to some different constants..
    bool Test (Real tmax, int numSteps, const Vector3<Real>& velocity0,        const Vector3<Real>& rotCenter0, const Vector3<Real>& rotAxis0,        const Vector3<Real>& velocity1, const Vector3<Real>& rotCenter1,        const Vector3<Real>& rotAxis1);


When you call the find function for IntrBox3Box3 I guess you are using the mContactTime for tmax calculated by the dynamic test-query function, right?

For some reason my mContactTime from the dynamic test-query is always 0.. but I'll figure that one out I guess..

Thanks for all your work btw :) I got your Game Physics book, its great :) Even though its a bit heavy with my math level, but I'm getting into it and never give up ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.