From 66b1e02847e08b8e66e9969f0a3d138c15cc70f4 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sun, 21 Jul 2024 17:48:00 +1000 Subject: terrain/hmap skeleton --- src/core/camera.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/camera.c') 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)) { -- cgit v1.2.3-70-g09d2