View Full Version : Collision detection - getting stuck on corners

05-01-2005, 08:37 PM
Hi there,
I am currently implementing collision detection on walls by doing a moving sphere(camera) polygon test. The camera stops and slides as it should except when it hits the outside corners of walls(say the outside of a building). My camera then gets stuck.

Now, after some debugging, I know it's getting stuck because both walls share an edge. My collision detector then is unable to reliably tell me which wall I'm in contact with and therefore my collision response functions also break.

I have managed to get a work around by enclosing each wall in a slightly larger bounding plane. But this doesn't feel like a very satisfactory solution - when I'm at the level of the wall it seems as though I might as well test directly against the on screen geometry. Anyone dealt with this before? Am I on the wrong path?

Thanks, Ben

05-02-2005, 11:10 AM
Moving to the math section.