2D object-aligned bounding-box intersection test
        Posted  
        
            by 
                AshleysBrain
            
        on Game Development
        
        See other posts from Game Development
        
            or by AshleysBrain
        
        
        
        Published on 2011-01-30T21:59:57Z
        Indexed on 
            2011/01/30
            23:33 UTC
        
        
        Read the original article
        Hit count: 415
        
Hi all,
I have two object-aligned bounding boxes (i.e. not axis aligned, they rotate with the object). I'd like to know if two object-aligned boxes overlap. (Edit: note - I'm using an axis-aligned bounding box test to quickly discard distant objects, so it doesn't matter if the quad routine is a little slower.)
My boxes are stored as four x,y points. I've searched around for answers, but I can't make sense of the variable names and algorithms in examples to apply them to my particular case.
Can someone help show me how this would be done, in a clear and simple way? Thanks. (The particular language isn't important, C-style pseudo code is OK.)
© Game Development or respective owner