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

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 15:07

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

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