From b08e9f407423ba5b0771d9200fd4b543abcf4576 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Tue, 20 Dec 2016 22:25:17 +0100 Subject: [PATCH] Setter for camera position --- base/camera.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/camera.hpp b/base/camera.hpp index bac67c6b..c6c1a51b 100644 --- a/base/camera.hpp +++ b/base/camera.hpp @@ -80,6 +80,12 @@ public: matrices.perspective = glm::perspective(glm::radians(fov), aspect, znear, zfar); } + void setPosition(glm::vec3 position) + { + this->position = position; + updateViewMatrix(); + } + void setRotation(glm::vec3 rotation) { this->rotation = rotation;