summaryrefslogtreecommitdiff
path: root/ui/manualCameraController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/manualCameraController.cpp')
-rw-r--r--ui/manualCameraController.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/manualCameraController.cpp b/ui/manualCameraController.cpp
index 74b526b..6d4a22a 100644
--- a/ui/manualCameraController.cpp
+++ b/ui/manualCameraController.cpp
@@ -78,7 +78,6 @@ ManualCameraController::render(const UIShader &, const Position &) const
void
ManualCameraController::updateCamera(Camera * camera) const
{
- camera->forward = glm::normalize(sincosf(direction) ^ -sin(pitch));
- camera->pos = !focus + up * 3.F - (camera->forward * std::pow(dist, 1.3F));
- camera->up = up;
+ camera->setView(!focus + up * 3.F - (camera->getForward() * std::pow(dist, 1.3F)),
+ glm::normalize(sincosf(direction) ^ -sin(pitch)));
}