Rotate model with mouse

Work this
float[] camAngles = camRotation.toAngles(null);

        float rotationY = camAngles[1];
        
        float rotateCharacter = rotationYOld - rotationY;
        
        rotationYOld = rotationY;
        

        //Quaternion localRotation = new Quaternion(-0.173f, rotationY, -0.002364515f, 0.9830f);

        //localRotation.multL
        
        
        characterModel.rotate(0.0f, rotateCharacter, 0.0f);

But character must be rotate with camera direction

1 Like