My knowledge about collision is very basic, I just know that meshes are approximated into boundingBoxes or boundingSpheres and then You just use AABB technique and in this way You are able to detect collision. However when You have some complex meshes like human I cannot use one boundingBox/boundingSphere because when there will be contact with the ball (shoulders/legs/knees) then the effect of bounce will be not realistic as probably the ball won't even contact with the body when it will be bounced into opposite direction.
Second fact is that my human mesh is also animated (run, walk/ move the hands etc.).
What technique I should use to detect collision between human and the ball? My concept:
1.) I created in Blender my mesh and then exported it to x file. So use Blender once again and create rectangular and sphere obejcts per bone so they approximize the original mesh. Assign to each rectangular/sphere object weight =1 per bone by which it is covered. Then export such rectangular mesh to x file.
2.) Import two meshes (one normal and second one rectangularized). There is such function in directX as GetVertexInfluence for each bone or something like that. With the aid of this function try to find all rectangular/sphere objects. In this way You will have boundingBoxes of the original mesh.
3.) In each frame when You move the animation find which matrix (final/offset or other one) will transform Your boundingBoxes/spheres so that they follow animated bones.
That is my algorithm I invented partly on my own and partly through the google. If anybody has any idea how to improve my algorithm or have better idea how to create bounding box per animated mesh I would be grateful.
Edited by anders211, 01 November 2013 - 12:32 PM.