Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Speed and Collision Detection

Name: Anonymous 2010-05-16 12:17

I'm thinking about writing a program in which a bunch of blocks fly around the screen and bounce off of each other after collision occurs. Here's my problem: If speed is determined by pixels/update and blocks have the potential to move faster than one blocks width/update, how could I detect collision when two fast moving blocks speed through each other without touching?

Name: Anonymous 2010-05-16 12:22

What
The answer is still on the front page
IHBT

Name: Anonymous 2010-05-16 12:23

>>2
Fuck I didn't read any threads before posting this.

Name: Anonymous 2010-05-16 12:26

Name: Anonymous 2010-05-16 14:17

collison.ie
COLLISION DETECTED

Name: Anonymous 2010-05-16 15:07

>>4
So just calculate if the (x1,y1)->(x+dx1,y+dy1) and (x2,y2)->(x+dx2,y+dy2) vectors intersect?

Name: Anonymous 2010-05-16 15:19

>>6
Yes, if:
- (dx1, dy1) is the velocity of (x1, y1), the point on the first object that is nearest to the second object;
- (x2, y2) -> (x2+dx2, y2+dy2) is a vector describing the side of the second object that is nearest to (x1, y1);
or vice versa.

Otherwise (if (x1, y1) and (x2, y2) are single points) the intersection would have to occur at the same fraction of each vector length, otherwise they will have just missed each other.

Name: Anonymous 2010-05-16 15:25

[b]COLLIDE WITH MY ANUS[/b]

Name: Anonymous 2010-05-16 16:59

>>8
Just go away already.

Name: Anonymous 2010-05-16 20:50

>>9
ALREADY MY ANUS

Name: Anonymous 2010-05-17 0:18

>>11
Please optimize your references: >>10,10,10,10,10,10,10,10,10,10,10,10

Name: Anonymous 2010-05-17 3:02

Name: > 2010-05-17 3:03

/

Name: >>,,,,,,,,,,,,,,,, 2010-05-17 3:05

>>,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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ymous 2010-12-25 13:36

Name: Anonymous 2011-02-03 6:41

Name: Anonymous 2011-03-14 3:00

                                       AUTISMS
  autisms
      1 ++---------------+----------------*----------------+---------------++
        +                +               *+*          exp(-x**2 / 2) ****** +
    0.9 ++                              *   *                              ++
        |                               *   *                               |
    0.8 ++                              *   *                              ++
    0.7 ++                              *    *                             ++
        |                              *     *                              |
    0.6 ++                             *      *                            ++
        |                             *       *                             |
    0.5 ++                            *       *                            ++
        |                             *       *                             |
    0.4 ++                            *        *                           ++
        |                            *         *                            |
    0.3 ++                           *          *                          ++
    0.2 ++                          *           *                          ++
        |                          *             *                          |
    0.1 ++                         *             *                         ++
        +                +       **       +       **       +                +
      0 **************************--------+--------**************************
       -10              -5                0                5                10
                                       quality

Don't change these.
Name: Email:
Entire Thread Thread List