I am working on a game using Java2D, and I’m trying to rotate a bounding box surrounding a sprite.
The original points of the bounding box are just obtained from the size of the image used for the sprite, so I have a polygon with the points (0,0), (imgWidth,0),(imgWidth,imgHeight),(0,imgHeight)
Now, I’m trying to figure out how to rotate these points around any other given point (as each sprite may have a different rotation point) by a particular direction (in degrees at the moment) to find the new polygon which will define the bounding box.
Can anybody help me with the equations? Math is definitely my weak point, unfortunately .
