rotatedRectangle

fun rotatedRectangle(x: Float, y: Float, z: Float, width: Float, height: Float, depth: Float, pitch: Float, yaw: Float, roll: Float, centerX: Float = x + width / 2f, centerY: Float = y + height / 2f, centerZ: Float = z + depth / 2f): Hitbox3D

Creates a rotated rectangular hitbox defined by its minimum and maximum x, y, and z coordinates and rotation angles.

Return

A new Hitbox3D representing the rotated rectangle.

Parameters

x

The starting x coordinate.

y

The starting y coordinate.

z

The starting z coordinate.

width

The width of the rectangle.

height

The height of the rectangle.

depth

The depth of the rectangle.

pitch

The rotation angle around the x-axis in degrees.

yaw

The rotation angle around the y-axis in degrees.

roll

The rotation angle around the z-axis in degrees.