AHelper wrote:
KermMartian wrote:
How would you do the equivalent of graphics-based collision detection in Java, then? Is it not possible?
You can use an Area to do this. The intersect(Area rhs) function sets the Area to the intersected area (essentially an AND). You can then use isEmpty() to see if there is anything in the area. If true, then they collided. This isn't quite pixel-based, but it allows vector-based graphics collision.

Incidentally, you're replying to a post that is 5+ years old Smile
elfprince13 wrote:
AHelper wrote:
KermMartian wrote:
How would you do the equivalent of graphics-based collision detection in Java, then? Is it not possible?
You can use an Area to do this. The intersect(Area rhs) function sets the Area to the intersected area (essentially an AND). You can then use isEmpty() to see if there is anything in the area. If true, then they collided. This isn't quite pixel-based, but it allows vector-based graphics collision.

Incidentally, you're replying to a post that is 5+ years old Smile
I already talked to KermM and he said to post it anyways Smile
Okay Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement