realbasic-games
[Top] [All Lists]

Re: detecting tile collisions (was Re: Pixel Level)

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: detecting tile collisions (was Re: Pixel Level)
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Sat, 18 Dec 2004 14:25:41 -0600
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20041218 dot 120817 dot 25375 dot 348505 at webmail16 dot lax dot untd dot com>
At 8:08 PM +0000 12/18/04, Eric Richards wrote:

So when you said " when moving up, you really want
to check points A and B, which are slightly
higher than the corners  of your sprite.",  -4
is going to be what I want, as shown below ?

No. Points A and B were directly above the corners of the sprite. The points you're using in the code here are not directly above or to the side of any corner -- they're set out diagonally:

    CornerX = (Knight.X-4)// This should be the Top Left
    CornerY = (Knight.y-4)// ...

Again, please draw yourself a picture, perhaps on graph paper to make it precise. I think your difficulties all stem from not visualizing what the numbers mean. Correct that, by actually drawing it, and I think you'll not only have the answer to this question, but to the next several questions you would otherwise be asking. :)

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>

<Prev in Thread] Current Thread [Next in Thread>