studio: invert mouse scroll direction for camera zoom.

PiperOrigin-RevId: 837603911
Change-Id: I193a1abc0a3317aa998e7f82b9ce4b282ae7a913
This commit is contained in:
Yuval Tassa
2025-11-27 13:27:23 -08:00
committed by Copybara-Service
parent dc5c2faf91
commit 2ea403575e
+3 -3
View File
@@ -440,10 +440,10 @@ void App::HandleMouseEvents() {
}
}
// Mouse scroll zooms the mouse. Free cameras don't have the concept of
// zooming, so we ignore the scroll in those cases.
// Mouse scroll zooms the camera towards/away from the lookat point.
// Ignored by user-centered free cameras which don't have a lookat point.
if (mouse_scroll != 0.0f && ui_.camera_idx != toolbox::kFreeCameraIdx) {
MoveCamera(toolbox::CameraMotion::ZOOM, 0, mouse_scroll);
MoveCamera(toolbox::CameraMotion::ZOOM, 0, -mouse_scroll);
}
// Left double click.