Advertisement Jump to content


This topic is now archived and is closed to further replies.


Dynamic collision detection question

This topic is 6172 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I programmed a static OBB collision detection routine based on the separating axis theorem. Everything works fine. I tried now to make that routine dynamic, but I guess there is somewhere a subtle thing I forgot and it does not react correctly with angular velocities. Can someone affirm/correct the following?? - The only difference between the static and dynamic collision is that in the dynamic collision, the separating axis are dependent on the time, as well as the distance between the two boxes. If we take small angles, the total rotation matrix can be linearized and is dependent on t, t^2 and t^3. Each box''s axis has to be multiplied with that matrix so we get axis1x(t,t^2,t^3), axis1y(t,t^2,t^3), axis1z(...), axis2x(...), axis2y(...), axis2z(...). The separating axis are now these 6 axis plus the 9 axis obtained by finding the cross product between each of these 6 axis. We get 6 axis dependent on t, t^2, t^3 and 9 axis dependent on t, t^2, t^3, t^4, t^5, t^6. I guess I can simply ignore terms in t^4 and higher. Each box''s rotated axis has to be projected onto the separating axis (positive projection). The separation between the boxes and the translational speed have also to be projected on that separating axis (with appropriate sign). We can then solve the equation A+Bt+Ct^2+Dt^3=0. The rough approximation is A+Bt=0. We should get zero or one distinct solution. If we have a pure translational speed, the second solution can be found easily. I thought that it would be similar with a pure rotational speed, but the results are sometimes strange. Can we think of the rotational speed''s effect as the increase/decrease of the original box''s size? Please, if you already went through all this, can you give me a clue?? Or at least can you give me an url where I can find some useful information about it? (I found a lot of info, but it always stops when it begins to become inferesting: when we also have to handle the rotational speed!) Thanks a lot

Share this post

Link to post
Share on other sites
No reply...

I got it finally to work!!!!
Theoretically I should solve a polynome of grade 20+ but by ignoring all t^x with x>3 it seems to be fine (only if the 3 angles are small enough (angle=sin(angle) and t also small enough).
I wrote a polynome solver for equations of type A+Bt+Ct^2+Dt^3=0, but the results are almost same as for A+Bt+Ct^2=0.

I''m still interested in how you solved dynamic collision detection. I can also show you my code should you be interested.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!