PDA

View Full Version : Character Environment Collision Detection


NYGhost
2003.09.30, 12:48 PM
Hello my forum

I'm trying to get a simple way to move my character around without penetrating walls.

Once I read an article about handling the situation with a cylinder collision detection.

Is this a good approach?
Do you know where can I read about it?

Thanks in advance ;)

MacFiend
2003.09.30, 01:05 PM
For cylinder tests, take a look at http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=30. I haven't actually studied the tutorial myself, but I clearly remember the cylinder tests.

Another approach, and the way I go about it, is to use ellipsoids (a bounding volume that offers a tight fit to most characters) and a swept-sphere test. This tutorial (http://www.peroxide.dk/download/tutorials/tut10/pxdtut10.html) is excellent for beginners, but it's VERY buggy, and doesn't explain the swept-sphere concept (which is 100% necessary). I reccomend reading it as it will introduce you to the concept of ellipsoid space. After you're done with that, I suggest you take a look at the new, PDF version of the tutorial (http://www.peroxide.dk/papers/collision/collision.pdf). The new tutorial is more in-depth, and its outcome is some really nifty collision detection and response, but it's still not perfect (like mine :)). One of the authors' collegues recently released a Windows/DirectX demo using the technique in the tutorial (http://www.dr-code.com/CollisionDemo.zip), which supposedly addresses some of the issues with the technique. From the looks of it, the demo is close to perfect, but it still has some flaws.