I am having issues with the camera, I cant find how to invert the AXIS
Now
- A point is 0,0,0
- B point is 1,0,0
- C point is 0,0,1
What I want is
- A point 0,0,0
- B point 0,0,1
- C point 1,0,0
I cant find the way to do this, so if you can explain also why is this happening it will be great! (if you need more code ask for it)
Code:
final float eyeX = 2.0f;
final float eyeY = 10f;
final float eyeZ = 6.0f;
final float lookX = 1.0f;
final float lookY = 0.0f;
final float lookZ = 6.0f;
final float upX = 1.0f;
final float upY = 0.0f;
final float upZ = 0.0f;
Matrix.setLookAtM(mViewMatrix, 0, eyeX, eyeY, eyeZ, lookX, lookY, lookZ, upX, upY, upZ);
ViewPort
GLES20.glViewport(0, 0, width, height);
final float ratio = (float) width / height;
final float left = -ratio;
final float right = ratio;
final float bottom = -1.0f;
final float top = 1.0f;
final float near = 1.0f;
final float far = 25.0f;
Matrix.frustumM(mProjectionMatrix, 0, left, right, bottom, top, near, far);