diff options
Diffstat (limited to 'src/core/camera.c')
-rw-r--r-- | src/core/camera.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/camera.c b/src/core/camera.c index 7f04207..e3e812c 100644 --- a/src/core/camera.c +++ b/src/core/camera.c @@ -45,6 +45,14 @@ void Camera_Update(Camera *camera) { Vec3 displacement = vec3_mult(camera->front, -speed); camera->position = vec3_add(camera->position, displacement); } + if (key_is_pressed(KEYCODE_Q)) { + Vec3 displacement = vec3_mult(camera->up, speed); + camera->position = vec3_add(camera->position, displacement); + } + if (key_is_pressed(KEYCODE_E)) { + Vec3 displacement = vec3_mult(camera->up, -speed); + camera->position = vec3_add(camera->position, displacement); + } // Mouse if (MouseBtn_Held(MOUSEBTN_LEFT)) { |