Rotate Box

Hello, i have a problem rotating a Box.



The Box is attached to a Node.

The Node was picked by the mouse and was rotated (and with it: the Box) like this:



Quaternion quat = new Quaternion();
quat.fromAngleNormalAxis(getAngle(), new Vector3f(0, 0, 1));
setLocalRotation(quat);




Now i would like to rotate the Box by picking it. I do it like this right now:


public void rotateObject(float oldX, float oldY, float newX, float newY) {
   Vector2f vector2f = new Vector2f(newX - oldX, newY - oldY);
        Quaternion rotQuat = new Quaternion();
        rotQuat.fromAngleAxis(vector2f.length() * 10, new Vector3f(newX - oldX, newY - oldY, 0)); // * 10 for speed
        setLocalRotation(rotQuat.mult(getLocalRotation()));
}



The Box rotates, but it does not rotate how i would like it to. If i rotate the Box, (after the Node was rotated) the Box does not rotate the way i am dragging the mouse, but the way the Node was moved before.

I can't think of how the Box has to rotate to get along with the dragging.

Thanks in advance for answers.