From b5df780b75fabeb9643838deb93eb86f3e96dcac Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 26 Dec 2024 00:58:36 +0000 Subject: [PATCH] fix: inverted controls --- shader.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shader.mjs b/shader.mjs index be42fe4..919e5f2 100644 --- a/shader.mjs +++ b/shader.mjs @@ -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);