added 4 camera positions - can switch between them with 1,2,3,4 keyboard input
This commit is contained in:
parent
20fcc2af63
commit
f83c533f6f
12
src/main.c
12
src/main.c
|
@ -55,6 +55,18 @@ SceneNode* rootNode;
|
|||
* Input handler for camera movement.
|
||||
* */
|
||||
void handleInputs(double deltaTime) {
|
||||
if (glfwGetKey(window, GLFW_KEY_1) == GLFW_PRESS) {
|
||||
cameraPosition = (vec3){0.0f, 1.7f, 2.4f};
|
||||
}
|
||||
if (glfwGetKey(window, GLFW_KEY_2) == GLFW_PRESS) {
|
||||
cameraPosition = (vec3){3.3f, 3.4f, -11.0f};
|
||||
}
|
||||
if (glfwGetKey(window, GLFW_KEY_3) == GLFW_PRESS) {
|
||||
cameraPosition = (vec3){-3.0f, 2.9f, -7.5f};
|
||||
}
|
||||
if (glfwGetKey(window, GLFW_KEY_4) == GLFW_PRESS) {
|
||||
cameraPosition = (vec3){-0.6f, 2.1f, -4.5f};
|
||||
}
|
||||
if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS) {
|
||||
cameraPosition.z += deltaTime * 10;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue