basic camera movement

This commit is contained in:
2023-06-05 13:15:27 +02:00
parent b72f4a7673
commit faf544f997
3 changed files with 8 additions and 5 deletions

View File

@@ -53,7 +53,7 @@ void WorldRenderer::Update() {
ImVec2 mouseDelta = ImGui::GetIO().MouseDelta;
const float relativeX = mouseDelta.x / (float)Display::GetWindowWidth() * 2;
const float relativeY = mouseDelta.y / (float)Display::GetWindowHeight() * 2;
MoveCam(relativeX, relativeY);
MoveCam(mouseDelta.x, mouseDelta.y);
}
if (io.MouseWheel != 0) {
ChangeZoom(io.MouseWheel);