At 7:11 PM -0600 2/25/05, Eric Richards wrote:
Does anyone know of any documents that I can download
that relate to collision detection of a "box to box" type - with
respect to 2D sprites?
I don't know of any documents, but box/box tests in 2D are pretty
trivial. Assuming that b1 and b2 are the bounds objects of the two
sprites, each with left/top/right/bottom properties. Then, they're
overlapping if
b1.right > b2.left and b1.left < b2.right and _
b1.bottom > b2.top and b1.top < b2.bottom
Best,
- Joe
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|