private void createPhysicsWorld() {
world = new World(new Vector2(0, 0), true);
float halfWidth = viewportWidth / 2f;
ChainShape chainShape = new ChainShape();
chainShape.createLoop(new Vector2[] {
new Vector2(-halfWidth, 0f),
new Vector2(halfWidth, 0f),
new Vector2(halfWidth, viewportHeight),
new Vector2(-halfWidth, viewportHeight) });
BodyDef chainBodyDef = new BodyDef();
chainBodyDef.type = BodyType.StaticBody;
groundBody = world.createBody(chainBodyDef);
groundBody.createFixture(chainShape, 0);
chainShape.dispose();
createBoxes();
}