Merge pull request #2353 from TwilitRealm/fix/freecam-mouse-fix

Only move Flycam when holding right click
This commit is contained in:
TakaRikka
2026-08-29 23:06:25 -07:00
committed by GitHub
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -7601,7 +7601,7 @@ bool dCamera_c::executeDebugFlyCam() {
if (ImGui::IsKeyDown(ImGuiKey_Q)) rollInput -= 1.0f;
if (ImGui::IsKeyDown(ImGuiKey_E)) rollInput += 1.0f;
}
bool mouseValid = !io.WantCaptureMouse && io.MousePos.x >= 0.0f && io.MousePos.y >= 0.0f;
bool mouseValid = !io.WantCaptureMouse && io.MousePos.x >= 0.0f && io.MousePos.y >= 0.0f && ImGui::IsMouseDown(ImGuiMouseButton_Right);
if (mouseValid && sFlyCamLastMousePos.x >= 0.0f) {
cStickX -= (io.MousePos.x - sFlyCamLastMousePos.x) * 2.0f;
cStickY -= (io.MousePos.y - sFlyCamLastMousePos.y) * 2.0f;