   BoundingBox diagonal detection
  I made the simple bounding box.And I found that the detection won't work in diagonal direction.Can somebody give me an idea?   
  Not sure what you mean, but bounding box collision should work fine regardless of direction, so if you're having problems, it's probably due to an error (or errors) in your code.Can you clarify your question? (And perhaps post your intersection test code as well...)   ;Quote:Original post by jykNot sure what you mean, but bounding box collision should work fine regardless of direction, so if you're having problems, it's probably due to an error (or errors) in your code.Can you clarify your question? (And perhaps post your intersection test code as well...)I tested with same 2 cubesWhen meshA hit meshB in the straight direction, meshA stop when its face hit meshB 's face.Then I made meshA hit meshB again in diagonal direction but in this timethe meshA didn't stop in corner of the point that meshA hit meshBbut meshA stop inside meshBbool BoundingBox_Collision(D3DXVECTOR3 BoxA_min, D3DXVECTOR3 BoxA_max, D3DXVECTOR3 BoxB_min, D3DXVECTOR3 BoxB_max){if(BoxA_min.z < BoxB_max.z && BoxA_max.z > BoxB_min.z && BoxA_min.x < BoxB_max.x && BoxA_max.x > BoxB_min.x && BoxA_min.y < BoxB_max.y && BoxA_max.y > BoxB_min.y){return true;}else{return false;}}I got min and max value from the lowest and highest value in vertices.   ;  This won't work because it doesn't handle all cases, looks like you only test if BoxA is completely inside BoxB. Somebody posted a correct solution in this thread http://www.gamedev.net/community/forums/topic.asp?topic_id=378193   