Archived

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

Max_Payne

Collision detection with AABBs and polygons

Recommended Posts

I can't seem to find good material on this. I know ways of performing AABB vs AABB or AABB vs polygon intersection testing... However, this is not an appropriate collision detection scheme. If simply check for intersections every frame and block movement if there is an intersection, the physics will end up being jumpy, and eventually, it might even be possible for fast objects to go through each other when the framerate is sufficiently low. I need to know how to find when AABBs intersect each other or intersect with convex polygons (n-gons, not necessarily triangles) in time... So that I can stop them just before the collision occurs. I read that you could possibly perform intersection tests in 4 dimensions, the 4th being time... However, I have no idea on how to do this. Any helpful material, URLs, PDF documents, or even your tips and experience would be appreciated :D

Looking for a serious game project?
www.xgameproject.com [edited by - Max_Payne on May 19, 2004 3:27:37 PM]

Share this post


Link to post
Share on other sites
Dave Eberly''s got a doc on doing swept tests between boxes and triangles. It''s an extended version of the separating axis algorithm, which includes velocities
http://www.magic-software.com/Documentation/MethodOfSeparatingAxes.pdf
http://www.magic-software.com/Documentation/DynamicCollisionDetection.pdf
http://www.magic-software.com/Documentation/IntersectionRotatingBoxes.pdf

Share this post


Link to post
Share on other sites
Yes, the separating axis test is what you want. For AABBs it can obviously be simplified due to the axis alignment, but for polygons you''ll have to use the generic method. Eberly''s articles are a good place to start.

Share this post


Link to post
Share on other sites