I have two colliding boxes, How i can calculate contact information like (contact normal, contact point and penetration) .
Is there any simple algorithm .
Note: i'm using XNA .
|show 3 more comments|
I think this topic has been discussed a few times in the "Physics for Game Programmers" tutorial sessions at the Game Developers Conference.
This paper should at least give you some ideas: bullet.googlecode.com/files/GDC10_Coumans_Erwin_Contact.pdf
There has definitely been at least one presentation by Erin Catto about how he does it in Box2d, but it's not clear whether the OP wants 2d or 3d. Anyway, his presentations are excellent and at least one of them (the 2008 one IIRC) mentions contact generation between two boxes via clipping: http://code.google.com/p/box2d/downloads/list
Maybe I'm not fully understanding your question, but if you're looking for general info on collision detection Microsoft has two MSDN pages available, one specifically for XNA:
You could also look at the Box2D physics engine to get more detailed info on the technical aspects.