Java2D Distance Collision Detection

Posted by Trizicus on Stack Overflow See other posts from Stack Overflow or by Trizicus
Published on 2010-04-22T02:34:31Z Indexed on 2010/04/22 2:43 UTC
Read the original article Hit count: 406

Filed under:
|
|

My current setup is only useful once collision has been made; obviously there has to be something better than this?

public boolean CollisionCheck(Rectangle rect1, Rectangle rect2) {
   if(rect1.intersects(rect2)) {
      return true;
   }
   return false;
}

How can I do preemptive collision detection?

© Stack Overflow or respective owner

Related posts about java2d

Related posts about collision-detection