I'm fighting with the code, to make it rotate camera around the object. The code that I'm using is:
eyeX = (float) (obj.x + 500*Math.cos(Math.toRadians(angle))*Math.sin(Math.toRadians(angle)));
eyeY = (float) (obj.y + 500*Math.sin(Math.toRadians(angle))*Math.sin(Math.toRadians(angle)));
eyeZ = (float) (obj.z + 500*Math.cos(Math.toRadians(angle)));
Matrix.setLookAtM(mViewMatrix, 0, eyeX, eyeY, eyeZ, obj.x, obj.y, obj.z, 0, 1, 0);
Where obj is the model I want to rotate the camera around, and angle is incremented by 1 with every draw. Can somebody shed a light to this problem, what I'm doing wrong?