File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -82,19 +82,23 @@ void computeMatricesFromInputs(){
8282 glm::vec3 left = (-1 .0f )*right;
8383
8484 // Move forward
85- if (glfwGetKey ( window, GLFW_KEY_UP ) == GLFW_PRESS){
85+ if (glfwGetKey ( window, GLFW_KEY_UP ) == GLFW_PRESS
86+ || glfwGetKey ( window, GLFW_KEY_W ) == GLFW_PRESS){
8687 position += forwards * deltaTime * speed;
8788 }
8889 // Move backward
89- if (glfwGetKey ( window, GLFW_KEY_DOWN ) == GLFW_PRESS){
90+ if (glfwGetKey ( window, GLFW_KEY_DOWN ) == GLFW_PRESS
91+ || glfwGetKey ( window, GLFW_KEY_S ) == GLFW_PRESS){
9092 position += backwards * deltaTime * speed;
9193 }
9294 // Strafe right
93- if (glfwGetKey ( window, GLFW_KEY_RIGHT ) == GLFW_PRESS){
95+ if (glfwGetKey ( window, GLFW_KEY_RIGHT ) == GLFW_PRESS
96+ || glfwGetKey ( window, GLFW_KEY_D ) == GLFW_PRESS){
9497 position += right * deltaTime * speed;
9598 }
9699 // Strafe left
97- if (glfwGetKey ( window, GLFW_KEY_LEFT ) == GLFW_PRESS){
100+ if (glfwGetKey ( window, GLFW_KEY_LEFT ) == GLFW_PRESS
101+ || glfwGetKey ( window, GLFW_KEY_A ) == GLFW_PRESS){
98102 position += left * deltaTime * speed;
99103 }
100104 // Move up
You can’t perform that action at this time.
0 commit comments