Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualAardvajk

Posted 01 January 2013 - 07:13 PM

Well i know that. But what is the best method to use to do this?
Check each axis of the two rectangles to see if either overlap. If so, separate by either the minimum axis of overlap or by some heuristic based on the direction of travel.

This is pretty simple, what exactly are you having trouble with detecting and resolving axis-aligned rectangles?

#1Aardvajk

Posted 01 January 2013 - 07:12 PM

<blockquote class="ipsBlockquote" data-author="AdvsNoob" data-cid="5016350"><p>Well i know that <img data-cke-saved-src="http://public.gamedev.net//public/style_emoticons/default/tongue.png" src="http://public.gamedev.net//public/style_emoticons/default/tongue.png" class="bbc_emoticon" title=":P" /> But what is the best method to use to do this?</p></blockquote><br />Check each axis of the two rectangles to see if either overlap. If so, separate by either the minimum axis of overlap or by some heuristic based on the direction of travel.<br /><br />This is pretty simple, what exactly are you having trouble with detecting and resolving axis-aligned rectangles?

PARTNERS