summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-26 21:13:41 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-01-26 21:14:16 +0000
commitce60561dfdb3d3cb583bcc38cbcb93b9cd1b13a6 (patch)
treec923445bf3f3452384af00d0b67df2ae2f100f07 /gfx/gl/camera.cpp
parentBetter default camera pos (diff)
downloadilt-ce60561dfdb3d3cb583bcc38cbcb93b9cd1b13a6.tar.bz2
ilt-ce60561dfdb3d3cb583bcc38cbcb93b9cd1b13a6.tar.xz
ilt-ce60561dfdb3d3cb583bcc38cbcb93b9cd1b13a6.zip
Basic mouse navigation
Diffstat (limited to 'gfx/gl/camera.cpp')
-rw-r--r--gfx/gl/camera.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp
index b4a76d0..2f48ca5 100644
--- a/gfx/gl/camera.cpp
+++ b/gfx/gl/camera.cpp
@@ -20,6 +20,12 @@ Camera::MoveForward(float amt)
}
void
+Camera::SlideForward(float amt)
+{
+ pos += forward * amt * glm::vec3 {1, 0, 1};
+}
+
+void
Camera::MoveRight(float amt)
{
pos += glm::cross(up, forward) * amt;