I am trying to create a bounding box for my sprite using box2d, but the box is being created at the wrong spot. I followed a tutorial on the wiki using this code
BodyDef bodyDef1 = new BodyDef();
bodyDef1.type = BodyDef.BodyType.DynamicBody;
bodyDef1.position.set(player.getX(), player.getY());
playerBody = world.createBody(bodyDef1);
PolygonShape square = new PolygonShape();
square.setAsBox(player.getWidth() / 2, player.getHeight() / 2);
FixtureDef fixtureDef1 = new FixtureDef();
fixtureDef1.shape = square;
fixtureDef1.density = 0.1f;
Player is a just the sprite that I am trying to create the box around.