fix: inverted controls

This commit is contained in:
stitchy 2024-12-26 00:58:36 +00:00
parent 6161fdc460
commit b5df780b75
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8

View file

@ -125,8 +125,8 @@ function updateCamera(gl, program) {
// Rotation
const rot = gl.getUniformLocation(program, "camera_rot");
let M1 = calcRotationMatrix([0, 1, 0], mouse_pos[0]);
let M2 = calcRotationMatrix([1, 0, 0], mouse_pos[1]);
let M1 = calcRotationMatrix([0, -1, 0], mouse_pos[0]);
let M2 = calcRotationMatrix([-1, 0, 0], mouse_pos[1]);
let rot_mat = glMatrix.mat3.create();
glMatrix.mat3.mul(rot_mat, M1, M2);