How can I make an object's hitbox rotate with its texture?
        Posted  
        
            by 
                Matthew Optional Meehan
            
        on Game Development
        
        See other posts from Game Development
        
            or by Matthew Optional Meehan
        
        
        
        Published on 2014-06-03T00:05:17Z
        Indexed on 
            2014/06/04
            15:46 UTC
        
        
        Read the original article
        Hit count: 541
        
In XNA, when you have a rectangular sprite that doesnt rotate, it's easy to get its four corners to make a hitbox. However, when you do a rotation, the points get moved and I assume there is some kind of math that I can use to aquire them.
I am using the four points to draw a rectangle that visually represents the hitboxes.
I have seen some per-pixel collision examples, but I can forsee they would be hard to draw a box/'convex hull' around. I have also seen physics like farseer but I'm not sure if there is a quick tutorial to do what I want.
© Game Development or respective owner