Results 1 to 4 of 4

Thread: Collision Boxes

  1. #1
    Samkough is offline Member
    Join Date
    May 2013
    Posts
    7
    Rep Power
    0

    Default Collision Boxes

    Does anyone know the code for collision boxes?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default Re: Collision Boxes

    Hi Samkough, you'll find that you'll get the advice if you ask a precise question. "collision boxes" requires that people guess, and most won't do that.

    So, are you trying to *detect* whether two rectangular things intersect? If so, what sort of things are they (components in a container, instances of Rectangle, etc)?

  3. #3
    Samkough is offline Member
    Join Date
    May 2013
    Posts
    7
    Rep Power
    0

    Default Re: Collision Boxes

    Quote Originally Posted by pbrockway2 View Post
    Hi Samkough, you'll find that you'll get the advice if you ask a precise question. "collision boxes" requires that people guess, and most won't do that.

    So, are you trying to *detect* whether two rectangular things intersect? If so, what sort of things are they (components in a container, instances of Rectangle, etc)?
    Oh yes your right I should specify it.

    But no, when a rectangular object hits a certain area and it stops, due to a collision box. But yes, it can be also when to rectangular things intersect.

  4. #4
    zeyt is offline Member
    Join Date
    May 2013
    Posts
    10
    Rep Power
    0

    Default Re: Collision Boxes

    You can use interserct method from Rectangle objects. I guess it's the easiest way to manage collisions, but you'll spot some inaccuracy in exchange.

Similar Threads

  1. Boxes and BorderLayouts!
    By newbie123 in forum AWT / Swing
    Replies: 3
    Last Post: 02-11-2012, 06:06 PM
  2. Three Different Dialogue Boxes
    By lala in forum New To Java
    Replies: 7
    Last Post: 10-29-2010, 08:04 PM
  3. dialog boxes
    By gedas in forum Java 2D
    Replies: 1
    Last Post: 02-19-2010, 12:23 PM
  4. List Boxes
    By zzpprk in forum AWT / Swing
    Replies: 2
    Last Post: 12-15-2009, 10:43 PM
  5. Dragging Boxes
    By anilanar in forum New To Java
    Replies: 8
    Last Post: 09-05-2009, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •