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(){
82
82
glm::vec3 left = (-1 .0f )*right;
83
83
84
84
// 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){
86
87
position += forwards * deltaTime * speed;
87
88
}
88
89
// 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){
90
92
position += backwards * deltaTime * speed;
91
93
}
92
94
// 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){
94
97
position += right * deltaTime * speed;
95
98
}
96
99
// 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){
98
102
position += left * deltaTime * speed;
99
103
}
100
104
// Move up
You can’t perform that action at this time.
0 commit comments