diff options
-rw-r--r-- | ui/manualCameraController.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/manualCameraController.cpp b/ui/manualCameraController.cpp index 6d4a22a..8e52b0e 100644 --- a/ui/manualCameraController.cpp +++ b/ui/manualCameraController.cpp @@ -78,6 +78,6 @@ ManualCameraController::render(const UIShader &, const Position &) const void ManualCameraController::updateCamera(Camera * camera) const { - camera->setView(!focus + up * 3.F - (camera->getForward() * std::pow(dist, 1.3F)), - glm::normalize(sincosf(direction) ^ -sin(pitch))); + const auto forward = glm::normalize(sincosf(direction) ^ -sin(pitch)); + camera->setView(!focus - forward * 3.F * std::pow(dist, 1.3F), forward); } |