rotated Rectangle
fun rotatedRectangle(x: Float, y: Float, width: Float, height: Float, degrees: Float, centerX: Float = x + (width / 2f), centerY: Float = y + (height / 2f)): Hitbox2D
Creates a rotated rectangular hitbox given its position, size, and rotation angle.
Return
A Hitbox2D representing the rotated rectangle.
Parameters
x
The x coordinate of the top-left corner.
y
The y coordinate of the top-left corner.
width
The width of the rectangle.
height
The height of the rectangle.
degrees
The rotation angle in degrees.