You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please be gentle as I am still learning and this is my first gitHub issue.
This code, hopefully used properly, gives me distorted result:
lettransformMatrix=newFloat32Aray(16);letrotationQuat=newFloat32Array(16);glMatrix.quat.identity(rotationQuat);glMatrix.quat.setAxisAngle(rotationQuat,[0,0,1],someAngle);lettranslation=[0,0,0];letscale=[x,y,1]// I use same vertices positions for all sprites and then scale them accordinglyglMatrix.mat4.fromRotationTranslationScale(transformMatrix,rotationQuat,translation,scale);
Image rendered this way is distorted scale-wise.
However image is not distorted when calculations are done manually and I apply translation first, then scale and lastly rotation, like so:
Please be gentle as I am still learning and this is my first gitHub issue.
This code, hopefully used properly, gives me distorted result:
Image rendered this way is distorted scale-wise.
However image is not distorted when calculations are done manually and I apply
translation
first, thenscale
and lastlyrotation
, like so:This way things seem to be working fine and outputted matrix gives me correct result.
Am I doing something wrong or is it
glMatrix
mistaken?The text was updated successfully, but these errors were encountered: