I've moved my Camera (mViewMatrix) in the 3D Space, 15° to each angle x,y,z (with all angles 0° I have no issues with the camera rotation!)
All Objects in the 3D Space are fine (shown at the right bottom of the screen).
Ok, now I want to rotate the Camera around the X axis. The Objects in the bottom right corner should move from down to up on the right side.
But... because of the changed 15° camera angles ... the objects are moving not only down to up on the right side... they are moving also a little bit from right to left.
I think I have to change the vector from:
Matrix.setRotateM(mViewMatrix, 0, 15, 0, 1, 0);
to:
Matrix.setRotateM(mViewMatrix, 0, 15, cameraVector.x, cameraVector.y, cameraVector.z);
... or something.
This is what I did (I know I have to use a rotate matrix, but here I've posted the simple code, only for easy read reasons):
Matrix.setIdentityM(mViewMatrix, 0);
Matrix.translateM(mViewMatrix, 0, 0, 0, -8);
Matrix.setRotateM(mViewMatrix, 0, 15 + angle, 1, 0, 0);
Matrix.setRotateM(mViewMatrix, 0, 15, 0, 1, 0);
Matrix.setRotateM(mViewMatrix, 0, 15, 0, 0, 1);
It would be nice if someone can post a working simple demo code, because I've tried 5 days, and I don't know how to fix it (I've tested a lot).