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

collision resolution

Started by tiburon Jan 22, 2005 at 10:57 PM 2 replies 1.6k views
Original Post
tiburon
tiburon
Hi all, I have a problem with collision resolution using AABB's. I have not been able to solve it for quite some time. The problem is with collision of AABB's and the classification of planes. I have the dynamic objects which are square shaped bounded by AABB's, and static objects that are rectangles but are quite thin also bounded by AABB's. Collision detection is no problem, but collision resolution is a different matter. I use the interesecting plane's normal to project the next position that the dynamic object should be at. However, between frames, the object pass through the both planes and thus the opposite plane's normal. I think this problem is very much like the bullet passing walls. I've considered using a ray, but a bigger problem comes at wall corners that are perpendicular which we need an AABB to detect correctly. Furthermore, within one frame, the object can pass through both perpendicular walls. Do you guys have any ideas? thanks a lot, Ken
Zakwayda
Zakwayda
It'll require more work, but I think you'd be happier with continuous collision detection, which takes the motion of the objects into account and returns (generally) a first time of intersection along with a collision point and normal. This would solve 'tunnelling' (the bullet-wall problem), as well as strange results resulting from moving into an object and being pushed out the other side.

As to what specific method to use, there are quite a few options. Are you in 2D or 3D? What is the environment like? Is it an FPS?

In any case, continuous collision detection can be performed effectively with circles/spheres, AABBs, and OBBs against each other or against lines/planes/triangle soups.

If you'd like more specific suggestions, tell us a little more about your specific application.
tiburon
tiburon
Hi Jyk,

Thanks for your reply. I will research the continous collision detection you mentioned. The game is not an FPS. It is more of a platform game but in a smaller environment. Much like the 3D Pacman on PC game.

The CD strategy I am using is a sweep and prune technique since there are quite a lot of objects moving around all the time. Furthermore, all the walls except for the outer edges are deformable (ie. they can be destroyed). I chose to store the objects (dynamic and static) in a scene graph. The algorithms for CD are all basically in 2D as the game is essentially 2D displayed in 3D.

Thanks a lot for the reply.

Ken
gazsux
gazsux
Theres a summary of collision detection techniques for deformable objects here:
http://www-evasion.imag.fr/Publications/2004/TKZHRFCFMS04/STARmain.pdf

It may be of some use to you as there is a bit of discussion about the problems deformable objects throw up.

Topic Locked

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

Sign in to reply to this topic.