diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-21 17:48:00 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-07-21 17:48:00 +1000 |
commit | 66b1e02847e08b8e66e9969f0a3d138c15cc70f4 (patch) | |
tree | a598a4a1716fa985ab4359a60f6a2c93d2ee390b /src/core/camera.c | |
parent | 9f1bfa75490bbdf22dd57ff17352d2736a0891fa (diff) |
terrain/hmap skeleton
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)) { |