
stackexchange.com
https://gamedev.stackexchange.com/questions/24207/…
How do you implement 2D collision detection?
So it depends on what you are trying to do. If you want something simple, I recommend stick with axis aligned AABBs for most things - they make collision detection really easy. Generally when you're writing collision code you'll have to write specialized cases for all pairs of shapes (ie. line-line, line-circle, line-box, circle-line, circle-box, circle-circle, box-box). For 2D, the main ...