Use this method ( white papers ):
public void rect(float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float degrees)
Draws a rectangle in the x / y plane using ShapeRenderer.ShapeType.Line or ShapeRenderer.ShapeType.Filled. X and y indicate the lower left corner. Origin X and originY indicate the point at which you want to rotate the rectangle.
Use it like this: (x and y are the point in the center of the rectangle)
renderer.rect(x-width/2, y-height/2, width/2, height/2, width, height, 1.0f, 1.0f, myRotation);
rluks
source share