@Override
	public void input(float delta) {
		if (Input.getMouseDown(0)) {
			Input.setCursor(false);
			Input.setMousePosition(centerPosition);
			mouseLocked = true;
		}

		if (Input.getMouseDown(1) && rightClickUnlock) {
			Input.setCursor(true);
			mouseLocked = false;
		}

		if (Input.getKey(unlockMouseKey)) {
			Input.setCursor(true);
			mouseLocked = false;
		}

		if (mouseLocked) {
			Vector2f deltaPos = Input.getMousePosition().sub(centerPosition);

			boolean rotY = deltaPos.getX() != 0;
			boolean rotX = deltaPos.getY() != 0;

			if (rotY)
				getTransform().rotate(yAxis, (float) Math.toRadians(deltaPos.getX() * sensitivity));
			if (rotX)
				getTransform().rotate(getTransform().getRot().getRight(), (float) Math.toRadians(-deltaPos.getY() * sensitivity));

			if (rotY || rotX)
				Input.setMousePosition(new Vector2f(Window.getWidth() / 2, Window.getHeight() / 2));
		}
	}