2D SAT How to find collision center or point or area?

Posted by Felipe Cypriano on Game Development See other posts from Game Development or by Felipe Cypriano
Published on 2012-10-02T18:05:54Z Indexed on 2012/10/02 21:53 UTC
Read the original article Hit count: 346

Filed under:
|
|

I've just implemented collision detection using SAT and this article as reference to my implementation. The detection is working as expected but I need to know where both rectangles are colliding.

I need the center of the intersection More examples

I need to find the center of the intersection, the black point on the image above. I've found some articles about this but they all involve avoiding the overlap or some kind of velocity, I don't need this.

I just need to put a image on top of it. Like two cars crashed so I put an image on top of the collision. Any ideas?

## Update

The information I've about the rectangles are the four points that represents them, the upper right, upper left, lower right and lower left coordinates. I'm trying to find an algorithm that can give me the intersection of these points.

© Game Development or respective owner

Related posts about 2d

Related posts about collision-detection