Hello all! I'm kind of stuck in a rut here: I've got a collision detection system working for a first-person sort of game that I've been working on-- the player has a bounding sphere around him, and I do the following for collision detection against him and the polygons of the collision map:
I call a ray-on-polygon collision check from the center of the player's sphere in the reverse direction of a given polygon's normal. If the ray is colliding with the polygon, and the distance from the sphere to the polygon's plane is less than the sphere's radius, I push sphere that is the player back in the direction of the polygon's normal vector the amount that the sphere is in the wall (sphereRadius - spherePlaneDistance).
I hope this idea is clear. If it isn't, I'll try to explain a little better, but I'm pretty sure this method is pretty popular. Anyway, I've having issues with the corners and edges of meshes course.
The attached "good collision.png" shows a collision friendly to this system: we know there is a collision, and how to respond.
The "bad collision.png" shows the problem: Although the sphere really is colliding with the polygon, the ray doesn't actually hit the polygon so we can't tell. You can imagine this would make any convex joining of two polygons not work with the collision detection.
Sorry for the long and badly worded/drawn write-up ;D. Can someone help me out?