If I rotate about the X, or Y axis there is no skewing however for a pure 2D game that does not help me. When I try to rotate about the Z axis however the quad I am rendering for the sprite starts to skew until it disappears at 90 degrees appearing again shortly after a slowly resuming a quad shape. As far as I can tell I have written the code correctly, it is as I have written it before on 2D projects and it worked there I am either missing something stupid or OpenGL ES 2.0 does something different then what I expect, some excerpts of code follow:
Matrix.setLookAtM(ViewMatrix, 0, 0, 0, 3, 0f, 0f, 0f, 0f, 1.0f, 0.0f); Matrix.orthoM(ProjectMatrix, 0, -width/2, width/2, -height/2, height/2, 0 , 100);
Rotation/Scale/Translation(For in place set to identity first):
Matrix.translateM(Translation, 0, x, y, 1.0f); Matrix.setRotateM(Rotation, 0, angle += 0.05f, 0.0f, 0.0f, 1.0f); Matrix.scaleM(Scale, 0, 64,64,1.0f);
Multiplication of Matrices:
Matrix.multiplyMM(MVPMatrix, 0, ProjectMatrix, 0, ViewMatrix, 0); Matrix.multiplyMM(MVPMatrix, 0, MVPMatrix, 0, Translation,0); Matrix.multiplyMM(MVPMatrix, 0, MVPMatrix, 0, Rotation, 0) Matrix.multiplyMM(MVPMatrix, 0, MVPMatrix, 0, Scale, 0);
Thanks for any help.