fix: inverted controls
This commit is contained in:
parent
6161fdc460
commit
b5df780b75
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue