Here's my own take on it, which I hope to put to heavy use in an ongoing project. The OBB is modelled by an orientation matrix (in the form of two Vector2's because the Matrix type seems to suck), an origin and a Vector2 representing the +ve half widths in the x and y axis.
The object includes intersection methods and a crude draw method for debug purposes (you'll need to supply your own spritebatch and a 1x1 texture2d to use it)
0 comments:
Post a Comment