Collisions between RECTs
(2/27/00 8:18:38 am)

Hey there fellas. I have an interesting problem for you guys out there... 

I need to check whether or not one RECT is colliding with another RECT. This seemed like a simple task, but it is done repeatedly and I don't think that using 16 or so If...then statements is the key. The problem arises because one rect may be in the other, and there is no guarantee as too which rect is the bigger. If there is a formula for determining is the two collide, or a simple way of determining this that I am missing, I would love too hear about it.


(2/27/00 1:23:20 pm)

There's an API call you can use called "IntersectRect".. or so I hear  I've never used it myself.


(2/27/00 10:07:06 pm)

Yep. IntersectRect should do it nicely. 

(2/28/00 2:28:44 am)

Theres an API call for everything=P...

Thanks alot guys...