Search:

Type: Posts; User: jps

Search: Search took 0.10 seconds.

  1. Replies
    11
    Views
    10,638

    Re: game development- collision detection question

    contains is an overloaded method in the Rectangle class. You can also look for a Point or, x,y representing a location, is within the bounds of a rectangle (and more). Again, not that you should or...
  2. Replies
    11
    Views
    10,638

    Re: game development- collision detection question

    How would you detect two rectangles colliding if you were to draw them out on a 2d grid? Did you look at the contains method i mentioned?
    There are too many possible variations to just write a...
  3. Replies
    11
    Views
    10,638

    Re: game development- collision detection question

    Java has a "contains" method you may make use of, depending on what you have done in the implementation so far, just a note

    You can short circuit some of the testing away, possibly.
    Say object A...
Results 1 to 3 of 3