Jump to content

  • Log In with Google      Sign In   
  • Create Account

#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