public static void update(float dt) {

        float cameraSpeed=untranslateDistance(Camera.cameraSpeed);


        if (scale-Point.epsilon>scaleObject) setScale(Math.max(scaleObject, scale-dt*scaleSpeed));
        else if (scale+Point.epsilon<scaleObject) setScale(Math.min(scaleObject, scale+dt*scaleSpeed));
        else {

            if (xPos-Point.epsilon>xPosObject) xPos=Math.max(xPosObject, xPos-dt*cameraSpeed);
            else if (xPos+Point.epsilon<xPosObject) xPos=Math.min(xPosObject, xPos+dt*cameraSpeed);

            if (yPos-Point.epsilon>yPosObject) yPos=Math.max(yPosObject, yPos-dt*cameraSpeed);
            else if (yPos+Point.epsilon<yPosObject) yPos=Math.min(yPosObject, yPos+dt*cameraSpeed);

        }

        //if (Mouse.getDWheel()!=0)
            reScale(Mouse.getDWheel());
    }