public void setViewCenter(float x, float y) { Rectangle newView = new Rectangle(); newView.setFrameFromCenter(x, y, x + viewBounds.getWidth() / 2, y + viewBounds.getHeight() / 2); setViewBounds(newView); }