makeOffsetBox

fun makeOffsetBox(halfWidth: Float, halfHeight: Float, center: Vec2, angle: Float = 0.0f): Polygon

Create a box (rectangle) polygon with an offset center.

Parameters

halfWidth

The half-width of the box (x-axis extent)

halfHeight

The half-height of the box (y-axis extent)

center

The local center of the box

angle

The rotation angle in radians