I've been working on adding collision detection to my directx 11 engine. Its designed for a first person game, and takes place largely outdoors, so the main things the player will collide with are organic meshes like trees, rocks, etc.
I'm using the DirectXCollision library for the actual collisions (mostly sphere-triangle intersections), so I've go the detections part working fine. The problem then is handling the collision response once one or more collisions have been detected. I should note that that sometimes what works for simple flat walls doesn't always work well when you are dealing with weird organic meshes. I mitigate this somewhat by using simplified collision meshes.
The main issue I'm dealing with now is player movement and collision response. Right now I'm using a simple bounding sphere, and do a triangle intersect test on all objects nearby. So sometimes you will get multiple collsions at the same time. Everything I try seems to work in "most" cases... but sometimes you can get sucked around, or bounced or end up inside a mesh or whatnot...
Here is my basic method so far:
1) loop through all nearby objects and do a sphere-box test to see there is a possible collision. Then for each potential object, I loop through each triangle and store each collision in an array, along with the normal of the triangle I collide with.
2) I can then calculate the response for each collision in another loop. I do something like this:
direction = XMVector3Normalize(playerPosition - temppos); //where playerPosition is current pos, and temppos is where we would end if there is no collision
invNormal = invNormal * XMVector3Length(direction * normal);
wallDir = direction - invNormal;